only add users to pve admin group, if are can sudo

main
Simeon Keske 5 years ago
parent 65551fdc5e
commit a89e985df1
No known key found for this signature in database
GPG Key ID: B15B623C3C45B235

@ -74,4 +74,4 @@
cmd: 'pveum usermod {{ item.username if item.username is defined else item.name }}@pam -group admin'
with_items:
- "{{ users }}"
when: item.state != 'absent' and 'proxmox' in group_names
when: item.state != 'absent' and 'proxmox' in group_names and item.sudo is defined and item.sudo

Loading…
Cancel
Save