Test yourself
Ansible
Final exam · 14 questions · answers explained as you pick
Beginner
4 questions
01Ansible being agentless means…
Incorrect — there is a control node; it is the managed hosts that need no agent.
Correct — nothing to bootstrap on nodes; the control node pushes tasks over SSH.
Incorrect — it manages Windows over WinRM.
Incorrect — unrelated.
02The ansible ping module returning "pong" proves…
Incorrect — it is not ICMP at all.
Incorrect — it proves more than DNS.
Correct — it connects over SSH and runs a Python check — the real path you need.
Incorrect — it confirms the whole connection path.
03Idempotency in a well-written module means…
Correct — the second run of "install nginx" says changed: false because it is already installed.
Incorrect — that is the command/shell anti-pattern, not idempotency.
Incorrect — idempotency is about state, not error handling.
Incorrect — unrelated.
04Which modules break idempotency and should be a last resort?
Incorrect — these are idempotent, state-aware modules.
Correct — they run every time with no notion of state — guard with creates=/when: or use a real module.
Incorrect — these track state and are idempotent.
Incorrect — idempotent account modules.
4 questions · explanations appear as you answer
Intermediate
5 questions
01When two sources define the same variable, Ansible…
Incorrect — no — it resolves by precedence.
Correct — knowing the order is how you avoid the "won't change" debugging trap.
Incorrect — precedence is fixed, not random.
Incorrect — one wins by precedence.
02Facts in Ansible are…
Incorrect — they are discovered, not hand-defined.
Incorrect — no — that is Vault.
Correct — you branch on them (e.g. os_family) for portable automation.
Incorrect — unrelated.
03The template module’s validate option is used to…
Correct — prevents a bad templated config from taking a service down on reload.
Incorrect — that is Vault, not validate.
Incorrect — no — it checks the output.
Incorrect — it is about correctness, not speed.
04An Ansible role is…
Incorrect — groups are inventory; roles bundle automation.
Correct — include it in a play with one line; share via Galaxy.
Incorrect — unrelated.
Incorrect — no.
05A handler runs…
Incorrect — no — it is triggered, not pre-run.
Incorrect — only when notified by a changed task.
Correct — the "restart only if config changed" pattern.
Incorrect — it runs when notified.
5 questions · explanations appear as you answer
Advanced
5 questions
01Ansible Vault lets you…
Correct — the ciphertext is committable; you supply the password when running.
Incorrect — unrelated to Vault.
Incorrect — no.
Incorrect — no.
02Dynamic inventory solves what problem?
Incorrect — unrelated.
Correct — instances become groups by tag/region automatically.
Incorrect — that is Vault/SSH, not inventory.
Incorrect — unrelated to inventory source.
03delegate_to is used to…
Incorrect — that is when:/limits, not delegation.
Incorrect — unrelated.
Correct — e.g. remove this host from the LB by acting on the LB.
Incorrect — no — run_once does the opposite.
04Setting host_key_checking = False is dangerous because…
Correct — keep it on; manage known_hosts properly instead of disabling the check.
Incorrect — the risk is security, not speed.
Incorrect — unrelated.
Incorrect — the opposite — never disable it in prod.
05To preview an Ansible change safely in CI you run…
Incorrect — that forces, it does not preview.
Correct — Ansible’s closest thing to a plan; run it on every PR.
Incorrect — that decrypts secrets, unrelated to previewing changes.
Incorrect — un-previewed applies to prod are the risk being removed.
5 questions · explanations appear as you answer