Feat: add validate for sudoers
Signed-off-by: Hadrien Patte <hadrien.patte@protonmail.com>
This commit is contained in:
parent
737ca7b996
commit
8a48110c21
1 changed files with 2 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
|||
regexp: ^%{{ sudo_group }}
|
||||
line: "%{{ sudo_group }} ALL=(ALL:ALL) ALL"
|
||||
state: present
|
||||
validate: /usr/sbin/visudo -cf %s
|
||||
|
||||
# Set sudo location group
|
||||
- name: Configure sudoers sudo location group
|
||||
|
@ -31,4 +32,5 @@
|
|||
regexp: ^%{{ sudo_group_location }}
|
||||
line: "%{{ sudo_group_location }} ALL=(ALL:ALL) ALL"
|
||||
state: present
|
||||
validate: /usr/sbin/visudo -cf %s
|
||||
when: sudo_group_location is defined
|
||||
|
|
Loading…
Reference in a new issue