Validate config at deploy
This commit is contained in:
parent
3fee9243b7
commit
dc272820f4
1 changed files with 9 additions and 1 deletions
|
|
@ -21,7 +21,15 @@
|
||||||
# notify: Restart ssh
|
# notify: Restart ssh
|
||||||
|
|
||||||
- name: Installation de la configuration ssh
|
- name: Installation de la configuration ssh
|
||||||
template: src="{{ item }}" dest=/etc/ssh/sshd_config owner=root group=root mode=0600
|
template:
|
||||||
|
src: "{{ item }}"
|
||||||
|
dest: /etc/ssh/sshd_config
|
||||||
|
owner: root
|
||||||
|
group: root
|
||||||
|
mode: 0600
|
||||||
|
backup: 'yes'
|
||||||
|
validate: '/usr/sbin/sshd -t -f %s'
|
||||||
|
|
||||||
with_first_found:
|
with_first_found:
|
||||||
- files:
|
- files:
|
||||||
- sshd_config-{{ ansible_hostname }}.j2
|
- sshd_config-{{ ansible_hostname }}.j2
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue