use tests with -G instead of extended so sshd does not need to run

Signed-off-by: Sebastian Gumprich <rndmh3ro@users.noreply.github.com>
This commit is contained in:
Sebastian Gumprich 2024-05-27 15:39:18 +02:00
parent 13c40f66ad
commit d14b24303d

View file

@ -67,7 +67,7 @@
mode: "0600" mode: "0600"
owner: "{{ ssh_owner }}" owner: "{{ ssh_owner }}"
group: "{{ ssh_group }}" group: "{{ ssh_group }}"
validate: "{{ sshd_path }} -G -C user=root -C host=localhost -C addr=localhost -C lport=22 -f %s" validate: "{{ sshd_path }} -G -f %s"
notify: Restart sshd notify: Restart sshd
when: ssh_server_hardening | bool when: ssh_server_hardening | bool