Do not use notify inside handlers
Since latest ansible handlers are not triggered inside the same handlers flush, which means that triggering mysql restart the way we did does not work anymore. So instead of notifying inside handlers, we add listen key to tasks that are triggered by these newly produced notifications. This could be due to the bug [1], but ansible-core version that has backport included still shows inconsistent behaviour [1] https://github.com/ansible/ansible/issues/80880 Change-Id: I33a590e329cd455c9357d569867247f723d8a64a
This commit is contained in:
parent
90b1687038
commit
267ea035d2
@ -17,9 +17,10 @@
|
||||
src: "/etc/ssh/trusted_ca.d/"
|
||||
dest: "{{ ssh_keypairs_trusted_ca_file }}"
|
||||
mode: "0644"
|
||||
notify: Reload sshd
|
||||
|
||||
- name: Reload sshd
|
||||
service:
|
||||
name: "sshd"
|
||||
state: reloaded
|
||||
listen:
|
||||
- Regenerate trusted_ca file
|
||||
|
Loading…
Reference in New Issue
Block a user