1364 shaares
101 private links
101 private links
Ansible provides feature named handlers, which is like a task but will only run when called by a notifier in another task. This feature is important because your requirements for running a task may depend on the state of a service, existence of a file or a follow up tasks when state changed. We can make use of variables in notify and handlers which makes it more flexible. Ansible Handlers are used extensively in production and live environments as you always depend on something else to decide whether a task should run or not.