Hi,
I must be doing something wrong, but I don’t understand what.
I want notified handlers to run between one role and the next. From reading other posts here, it seems that is how it is supposed to work, but it’s not what I’m seeing.
A simplified version of my playbook layout is like this:
playbook.yml - this contains one role, Wholemeal.
Wholemeal/meta/main.yml – this contains one role as a dependency, Sourdough.
Wholemeal/tasks/main.yml – this contains some stuff that won’t work until the Sourdough handler, below, has restarted something.
Sourdough/tasks/main.yml – installs a configuration, notifies a service to restart.
Sourdough/handlers/main.yml – has the notify handler to restart the service
When I run ansible-playbook playbook.yml, I see it run the Sourdough tasks first, then immediately the Wholemeal tasks, and only after them does it run the Sourdough-notified handler
Is there a way to get this handler to run between the two roles?
Keeping in mind that I only want to run it if the config file was changed, not every time…
Thanks in advance,
Toby