-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a way to force handler execution #4777
Comments
Conceptually related to #4443. |
This would be the number one feature I would vote at this moment. It would also be nice if this flag could be configured as an option in Would this flag also mean that the handlers would be executed if the playbook fails the first time, or only on retry? I don't see why it shouldn't be possible to run handlers even if the playbook fails the first time. |
This will not be a ansible.cfg setting because we don't want it to run all the time, this would defeat the point of "notify" only running things on change. In those cases, just make something a task. Anyway, look for this to come very soon. The retry command will suggest adding --force-handlers, and --force-handlers is also a CLI switch you can select. Nothing will be adding this flag automatically. |
@alanfairless and @kustodian this is now implemented via the "--force-handlers" parameter in ansible-playbook. |
I would like a --skip-handlers, for provisioning reasons (My handlers, for example, reload services. Sometimes those services are not running yet.) |
If you need to use --skip-handlers, than you are probably not using handlers the right way. Handlers are run at the end of the play, so just make sure to start the service before it reaches the end and you shouldn't have any problems. Also handlers support |
If a playbook fails not all handlers may be run.
In this case it would be nice to have a --force-handlers that runs all handlers on a retry.
The line that prints the retry command should also indicate that this flag should be used.
The text was updated successfully, but these errors were encountered: