diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml index a3c3ffc..7cbfbb7 100644 --- a/group_vars/all/vars.yml +++ b/group_vars/all/vars.yml @@ -48,6 +48,7 @@ global_ssh_key_directory: "{{ global_public_key_directory }}/ssh" global_ssh_host_key_directory: "{{ global_ssh_key_directory }}/hosts" global_validate_shell_script: "/usr/bin/shellcheck -format=quiet %s" +global_validate_sudoers_file: "/usr/sbin/visudo -c -f %s" global_wireguard_private_directory: "{{ global_credentials_directory }}/wireguard" global_wireguard_public_directory: "{{ global_public_key_directory }}/wireguard/keys" diff --git a/roles/account/tasks/main.yml b/roles/account/tasks/main.yml index 7e2598f..06d753b 100644 --- a/roles/account/tasks/main.yml +++ b/roles/account/tasks/main.yml @@ -23,6 +23,7 @@ owner: root group: root mode: u=r,g=r,o= + validate: "{{ global_validate_sudoers_file }}" - name: Configure user account {{ username }} user: