Use listen instead of chained notifiers

From Ansible 2.2 onwards, listen can be used for
handlers instead of chaining notifiers. The
handlers are then executed in the sequence
present in the handler file.

Change-Id: I34312074ed2ab298111831fb5e1640d6a7ec77f5
This commit is contained in:
Jimmy McCrory 2018-03-17 14:10:45 -07:00
parent e7e2f2e794
commit e2117287b4

View File

@ -13,13 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
- name: Restart aodh services
command: "/bin/true"
notify:
- Stop services
- Copy new policy file into place
- Start services
- name: Stop services
service:
name: "{{ item.service_name }}"
@ -31,6 +24,7 @@
until: _stop | success
retries: 5
delay: 2
listen: Restart aodh services
# Note (odyssey4me):
# The policy.json file is currently read continually by the services
@ -48,6 +42,7 @@
group: "{{ aodh_system_group_name }}"
mode: "0640"
remote_src: yes
listen: Restart aodh services
- name: Start services
service:
@ -60,6 +55,7 @@
until: _start | success
retries: 5
delay: 2
listen: Restart aodh services
- name: Restart web server
service: