Automation, Orchestration, and Scripting

A task updates /etc/nginx/nginx.conf from a template. Nginx must reload only if the file actually changed, and only once even when several tasks change its configuration. Which component provides this behavior?

Show the answer

Correct answerA. A handler triggered with notify

A task that reports changed notifies a handler, which runs once at the end of the play regardless of how many tasks notified it. Tags only select which tasks run and have no change-detection logic.