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: If188ef9ef978332dc94b282893140de572bac6f3
This commit is contained in:
parent
6c783cde78
commit
52353e3771
@ -17,7 +17,6 @@
|
||||
shell: >-
|
||||
cat {{ zookeeper_ssl_cert }} $(test -f {{ zookeeper_ssl_ca_cert }} &&
|
||||
echo {{ zookeeper_ssl_ca_cert }}) {{ zookeeper_ssl_key }} > {{ zookeeper_ssl_keystore_location }}
|
||||
notify: Restart zookeeper
|
||||
listen:
|
||||
- cert installed
|
||||
|
||||
@ -28,6 +27,7 @@
|
||||
listen:
|
||||
- Restart zookeeper
|
||||
- systemd service changed
|
||||
- cert installed
|
||||
|
||||
- name: Symlink zookeeper
|
||||
file:
|
||||
@ -46,3 +46,4 @@
|
||||
listen:
|
||||
- Restart zookeeper
|
||||
- systemd service changed
|
||||
- cert installed
|
||||
|
Loading…
Reference in New Issue
Block a user