From 8194f488ad4d39d1d7cd013b96044b49078415f1 Mon Sep 17 00:00:00 2001 From: David Kilias Date: Wed, 9 Nov 2022 21:04:22 +0100 Subject: [PATCH] feat: :sparkles: add admins to proxmox user permissions file --- host-beaker.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/host-beaker.yml b/host-beaker.yml index 1553fb2..ccd5285 100644 --- a/host-beaker.yml +++ b/host-beaker.yml @@ -9,4 +9,20 @@ 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: