What does idempotency mean in the context of Ansible?
Idempotency: Ansible modules check current state before acting. If a package is already installed or a file already has the right content, the module reports ok and changes nothing, making repeated runs safe.
2 / 5
What does the changed status in Ansible output indicate?
changed: the module found a difference (file missing, package outdated, service stopped) and corrected it. A well-written playbook should show all ok on re-runs once converged — only the first run shows changed.
3 / 5
What is a handler in Ansible?
Handler: tasks notify handlers by name. Handlers run once at the end of the play if notified, avoiding redundant restarts if multiple tasks change config files — a service restarts only once per play, not per change.
4 / 5
What is an Ansible role?
Role: a conventional folder layout (tasks/main.yml, templates/, vars/) that bundles all the automation for a component (e.g., nginx). Roles are shared via Ansible Galaxy and promote DRY playbooks.
5 / 5
What does check mode (--check) do in Ansible?
Check mode: Ansible computes what changes would be needed and reports them, but does not apply them. Useful for auditing drift or previewing the impact of a playbook change before running it in production.