File tree Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Expand file tree Collapse file tree 2 files changed +8
-11
lines changed Original file line number Diff line number Diff line change 5757 mode : " 0644"
5858 when :
5959 - edpm_sshd_banner_enabled | bool
60+ register : sshd_banner_result
6061
6162 - name : Configure the motd banner
6263 become : true
8384 src : sshd_config_block.j2
8485 mode : " 0600"
8586 validate : ' /usr/sbin/sshd -T -f %s'
86- register : _sshd_config_result
87+ register : sshd_config_result
8788
88- - name : Set sshd config changed fact
89- ansible.builtin.set_fact :
90- _sshd_config_result_changed : _sshd_config_result.changed
89+ - name : Reload sshd due to config change
90+ ansible.builtin.systemd :
91+ name : sshd
92+ state : reloaded
93+ when :
94+ - sshd_config_result.changed or sshd_banner_result.changed|default(false)
9195
9296 - name : Configure firewall for the service
9397 become : true
Original file line number Diff line number Diff line change 2626 ansible.builtin.systemd :
2727 name : sshd
2828 state : started
29-
30- - name : Restart sshd due to config change
31- ansible.builtin.systemd :
32- name : sshd
33- state : reloaded
34- when :
35- - _sshd_config_result_changed | default(false)
You can’t perform that action at this time.
0 commit comments