Merge pull request 'feat: ✨ add admins to proxmox user permissions file' (!109) from feat/beaker-add-proxmox-permissions into master
Reviewed-on: https://gitea.n39.eu/Netz39_Admin/netz39-infra-ansible/pulls/109 Reviewed-by: Stefan Haun <tux@netz39.de> Reviewed-by: Alexander Dahl <alex@netz39.de>
This commit is contained in:
commit
ce770f9467
1 changed files with 16 additions and 0 deletions
|
@ -9,4 +9,20 @@
|
||||||
|
|
||||||
tasks:
|
tasks:
|
||||||
|
|
||||||
|
- name: enable proxmox gui login for admin users
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/pve/user.cfg
|
||||||
|
regexp: "^user:{{ item.logname }}@pam"
|
||||||
|
insertafter: "^user:"
|
||||||
|
line: "user:{{ item.logname }}@pam:1:0:::{{ item.email }}:::"
|
||||||
|
state: present
|
||||||
|
loop: "{{ users }}"
|
||||||
|
|
||||||
|
- name: configure proxmox admin group
|
||||||
|
ansible.builtin.lineinfile:
|
||||||
|
path: /etc/pve/user.cfg
|
||||||
|
regexp: "^group:Admins:"
|
||||||
|
# group:Admins:kwasir@pam,lespocky@pam,tux@pam::
|
||||||
|
line: "group:Admins:{{ users | map(attribute = 'logname') | join(\"@pam,\") }}@pam::"
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
|
|
Loading…
Reference in a new issue