One would normally think notify
statements will get queued up and dequeued at the end of the playbook run, in the same order they were notified.
However, that doesn’t seem to happen. Instead, they get executed in the order in which they were defined in the handler’s yaml file.
Is this behavior by design?
Yes, you can read more about it here
https://docs.ansible.com/ansible/latest/playbooks_intro.html#handlers-running-operations-on-change
I'm not agree with it been unintuitive or misleading, in my view it's one of Ansible's strength.
But you need to check the handlers to see it's order, it you would like to have the order you can always named them with a number that indicate the order.
ah cool! whether we agree or not, it is at least documented Thanks Kai!