DevOps · Flashcard

What is a handler in Ansible?

  • AA task that runs only when another task notifies it of a change
  • BA task that runs before every other task at the start of a play
  • CA task that automatically retries whenever it fails to complete
  • DA task that runs on the control node instead of the managed host

Why this is the answer

A handler runs only when a task notifies it (e.g. restart a service after a config change). It's not a pre-task, not a retry mechanism, and not a control-node-only task.

Official docs
Study in Gnoseed →