diff --git a/releasenotes/notes/ansible-force-handlers-1e00c9a88c29fe4f.yaml b/releasenotes/notes/ansible-force-handlers-1e00c9a88c29fe4f.yaml new file mode 100644 index 0000000000..c8ef33114d --- /dev/null +++ b/releasenotes/notes/ansible-force-handlers-1e00c9a88c29fe4f.yaml @@ -0,0 +1,8 @@ +--- +fixes: + - When a task fails while executing a playbook, the default behaviour for + Ansible is to fail for that host without executing any notifiers. This can + result in configuration changes being executed, but services not being + restarted. OpenStack-Ansible now sets ``ANSIBLE_FORCE_HANDLERS`` to + ``True`` by default to ensure that all notified handlers attempt to + execute before stopping the playbook execution. diff --git a/scripts/openstack-ansible.rc b/scripts/openstack-ansible.rc index 3ee0eba3c2..c1a91b2955 100644 --- a/scripts/openstack-ansible.rc +++ b/scripts/openstack-ansible.rc @@ -47,3 +47,5 @@ export ANSIBLE_SSH_PIPELINING="${ANSIBLE_SSH_PIPELINING:-True}" export ANSIBLE_STRATEGY_PLUGINS="${ANSIBLE_STRATEGY_PLUGINS:-/etc/ansible/roles/plugins/strategy}" export ANSIBLE_CONNECTION_PLUGINS="${ANSIBLE_CONNECTION_PLUGINS:-/etc/ansible/roles/plugins/connection}" + +export ANSIBLE_FORCE_HANDLERS="${ANSIBLE_FORCE_HANDLERS:-True}"