igorc
July 13, 2016, 8:25am
1
Hi,
I can’t find anywhere in the documentation any mention of the task order executed under notify. Having the example from the web docs:
- name: template configuration file
template: src=template.j2 dest=/etc/foo.conf
notify:
- restart memcached
- restart apache
does this guarantee that memcached is always going to be restarted before apache when the handles get flushed?
Thanks,
Igor
No.
All notify will run at the end an in the order they are in handlers file.
igorc
July 13, 2016, 10:29am
3
I guess same goes in case of different tasks calling different handles? Like:
- task1
notify:
- restart memcached
- tasks2
notify:
- restart apache
Yes.
The order the handlers are being notify has no influence on the order they are executed.
They will always be executed in the order they are in the handlers file.