In Ansible, a handler is similar to a regular task in a playbook, but it will only run if a task alerts the handler. Handlers are automatically loaded by roles//handlers/main.yaml. Handlers will run once, after all of the tasks are completed in a particular play.