Why is ansible notify not working?
Handlers will only be fired for tasks which report a changed
state. In the output of your play you can see the status is ok
, which in this case means no new packages have been installed or updated (since state=latest)
So it would work, if any of the packages would not have been installed already.
Though, instead of state started
I would use state restarted
, since you're always upgrading to the latest packages in your task (state=latest) If a package gets updated, you also should restart the service.