What are handlers?
Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Please Disable the AdBlocker to Continue to the site.
Handlers in Ansible are similar to regular tasks in a playbook, but they run when tasks include the notify directive and additionally indicate that something has changed. It only runs once after all of the tasks in a specific play have been executed. It automatically loads through roles/<role_name>/handlers/main.yaml.
They are used to change a service’s status, such as restarting or stopping it.