Cisco CCNA (200-301)Automation and ProgrammabilityHard

An engineer runs the same Ansible playbook against a switch twice in a row. Both times, the task 'Ensure VLAN 20 exists' produces the exact same end configuration on the device, and the second run reports zero changes made. What property of Ansible does this behavior demonstrate?

  1. APolymorphism
  2. BModularity
  3. CIdempotency
  4. DAbstraction
Show answer & explanation

Correct answer: C. Idempotency

Idempotency means that applying the same operation multiple times produces the same result as applying it once. Ansible modules are designed to be idempotent: if the desired state already exists (VLAN 20 already configured), running the playbook again makes no additional changes, which is why the second run reports zero changes.

Why the other options are wrong

  • A. Polymorphism is a programming concept unrelated to configuration state convergence.
  • B. Modularity refers to breaking playbooks into reusable roles/tasks, not repeated-run behavior.
  • D. Abstraction refers to hiding implementation complexity, not repeat-run consistency.

Idempotency

A property of automation modules where running the same task repeatedly against a device results in the same final state without unnecessary or repeated changes.

  • Second/subsequent runs report 'changed: 0' if state already matches
  • Core design principle of Ansible modules and Terraform providers
  • Prevents configuration drift and unintended side effects from repeated runs

Memory trick: Push the button twice, same result — no surprises.

More Automation and Programmability questions