sudo group by location

pull/1/head
Alexandre Iooss 5 years ago
parent a8d8e312e0
commit 489bb5ddcf
No known key found for this signature in database
GPG Key ID: 6C79278F3FCDCC02

@ -0,0 +1,3 @@
---
# Users in that group will be able to `sudo`
sudo_group_location: 'sudopacaterie'

@ -16,8 +16,16 @@
until: package_result is succeeded
# Set sudo group
- name: Configure sudoers
- name: Configure sudoers sudo group
lineinfile:
dest: /etc/sudoers
regexp: "^%{{ sudo_group }}"
line: "%{{ sudo_group }} ALL=(ALL:ALL) ALL"
# Set sudo location group
- name: Configure sudoers sudo location group
lineinfile:
dest: /etc/sudoers
regexp: "^%{{ sudo_group_location }}"
line: "%{{ sudo_group_location }} ALL=(ALL:ALL) ALL"
when: sudo_group_location is defined

Loading…
Cancel
Save