Skip to content
Snippets Groups Projects
Commit 574b66bb authored by Tóth Miklós Tibor's avatar Tóth Miklós Tibor :shrug:
Browse files

Only restart sshd if config changed

parent 42f5ff6c
Branches
Tags 0.1.0
No related merge requests found
...@@ -5,9 +5,11 @@ ...@@ -5,9 +5,11 @@
src: etc/ssh/sshd_config src: etc/ssh/sshd_config
dest: /etc/ssh/sshd_config dest: /etc/ssh/sshd_config
mode: 0600 mode: 0600
register: sshd_config
- name: Ensure sshd is started and enabled to start at boot. - name: Ensure sshd is started and enabled to start at boot.
service: service:
name: sshd name: sshd
state: restarted state: restarted
enabled: yes enabled: yes
when: sshd_config.changed
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment