diff --git a/roles/ldap-client/tasks/1_group_security.yml b/roles/ldap-client/tasks/1_group_security.yml index 607dce7..8477ac4 100644 --- a/roles/ldap-client/tasks/1_group_security.yml +++ b/roles/ldap-client/tasks/1_group_security.yml @@ -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