Add validation on sshd-config changes

This commit is contained in:
Mark Janssen 2024-07-14 20:02:12 +02:00
parent 5a3e1bd8ec
commit 789282c82b
Signed by: foobar
GPG key ID: D8674D8FC4F69BD2

View file

@ -108,6 +108,7 @@
path: /etc/ssh/sshd_config
regexp: "{{ item.regexp }}"
line: "{{ item.line }}"
validate: "/usr/sbin/sshd -t -f %s"
with_items:
- regexp: '^#?Port'
line: 'Port {{ ssh_port }}'