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