Skip to content
Snippets Groups Projects
Commit 58557a31 authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Handlers instead of register-when

parent bf0a0226
No related branches found
No related tags found
No related merge requests found
...@@ -4,3 +4,8 @@ ...@@ -4,3 +4,8 @@
name: sshd name: sshd
enabled: true enabled: true
state: restarted state: restarted
- name: Delete old config
file:
path: /etc/ssh/sshd_config
state: absent
...@@ -19,13 +19,7 @@ ...@@ -19,13 +19,7 @@
line: "#BEGIN ANSIBLE MANAGED SSH DEFAULTS" line: "#BEGIN ANSIBLE MANAGED SSH DEFAULTS"
state: present state: present
check_mode: true check_mode: true
register: config_no_blocks notify: Delete old config
- name: Delete old config
file:
path: /etc/ssh/sshd_config
state: absent
when: config_no_blocks.changed
- name: Load config template - name: Load config template
set_fact: set_fact:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment