diff options
Diffstat (limited to 'roles/ssh/tasks/main.yml')
| -rw-r--r-- | roles/ssh/tasks/main.yml | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/roles/ssh/tasks/main.yml b/roles/ssh/tasks/main.yml index 91ea250f..f88b9be4 100644 --- a/roles/ssh/tasks/main.yml +++ b/roles/ssh/tasks/main.yml @@ -50,7 +50,7 @@ ansible.builtin.copy: dest: "/etc/ssh/sshd_config" mode: "0640" - validate: 'sshd -T -f %s' + validate: "{{ 'sshd -T -f %s' if (not ansible_is_chroot) else omit }}" content: | KbdInteractiveAuthentication no # default installation is no UsePAM no # default installation is yes @@ -75,7 +75,7 @@ ansible.builtin.copy: dest: "/etc/ssh/sshd_config.d/99-auth-policy.conf" mode: "0640" - validate: 'sshd -T -f %s' + validate: "{{ 'sshd -T -f %s' if (not ansible_is_chroot) else omit }}" content: | Port {{ ssh_port }} PasswordAuthentication no @@ -94,7 +94,7 @@ ansible.builtin.copy: dest: "/etc/ssh/sshd_config.d/99-allowed-users.conf" mode: "0640" - validate: 'sshd -T -f %s' + validate: "{{ 'sshd -T -f %s' if (not ansible_is_chroot) else omit }}" content: | AllowUsers {{ username }} notify: |
