LOGBOOK

HELP

Quiz Entry - updated: 2026.10.22

Why is it a mistake to treat Ansible like a scripting language?

Ansible is a desired-state engine: you describe what the end state should be, and modules make only the necessary changes. Writing step-by-step commands throws away idempotency and readability.

Imperative (script) Declarative (Ansible)
You write How: run this command, then that one What: package X present, service Y started
Running it twice May repeat actions, append duplicates, fail Changes nothing if already correct
Reading it You have to simulate the steps in your head The file states the target state directly

A playbook full of shell: tasks is really a shell script in YAML form: it runs every command each time, reports "changed" constantly, and hides the intended end state. Use modules that express state (package, service, template, file) and Ansible works as designed.

Go deeper:

From Quiz: ITIA / Ansible Fundamentals: Automation, Architecture and the Automation Platform | Updated: Oct 22, 2026