Interview Q&A · questions with model answers

Ansible Interview Questions

Part of the study plan for: DevOps Engineer

Ordered by how often they're asked. Most-asked answers are free to read in full; members see every answer and can rate their confidence on each.

  1. Most asked What is idempotency in Ansible, and how do you keep your own tasks idempotent?

    An idempotent task can run any number of times and leaves the host in the same state, reporting changed only when it actually changed something. Built-in modules (apt, template, service, user) are…

  2. What is dynamic inventory, and why use it in the cloud?

    A dynamic inventory asks a source of truth (AWS, Azure, GCP, VMware, a CMDB) for the current hosts when the playbook starts, instead of reading a hand-maintained file. In the cloud, where instances…

Was this page helpful?

Report a mistake