sudo group by location

This commit is contained in:
Alexandre Iooss 2019-03-23 13:49:53 +01:00
parent a8d8e312e0
commit 489bb5ddcf
No known key found for this signature in database
GPG key ID: 6C79278F3FCDCC02
2 changed files with 12 additions and 1 deletions

View file

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

View file

@ -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