An Ansible playbook must restore missing NTP settings while leaving compliant settings unchanged during repeated production runs. Which approach BEST meets this requirement?
Show the answer
Correct answerD. Use idempotent modules to enforce desired settings.
AWhy not this: Inventory groups organize targets and variables; they do not determine whether configuration changes are necessary.
BWhy not this: Handlers run when notified by changed tasks; they do not themselves ensure that configuration tasks are idempotent.
CWhy not this: Check mode previews supported changes without applying them, so it cannot restore missing settings.
DWhy this is right: Idempotent modules enforce the desired configuration without changing settings that already match.
Idempotent modules compare existing settings with the desired configuration and change only what is needed, so repeated runs converge without unnecessary changes. Check mode previews supported changes but does not apply the missing settings.