Pcornel
Automation · Linux Automation

Ansible

Cheat sheet · https://pcornel.dk/topic.php?topic=5654

Back to the Topic

Answer

Ansible in Linux Automation applies the generic Ansible model specifically to Linux host configuration while preserving inventory, connection, become, module result and Linux read-back boundaries.

Remember

  • Ansible reachable ≠ become works.
  • Task ok/changed ≠ service behavior healthy.
  • Handler ran ≠ daemon accepted its configuration.
  • Idempotent rerun ≠ application acceptance.

First checks

  • ansible-playbook -i inventory site.yml --check --diff — preview
  • ansible-lint — lint
  • ansible <group> -m setup -a 'filter=ansible_distribution*' — facts

Verify in this order

playbook → SSH → modules → state

Where it usually breaks

Ansible task results do not replace Linux operating-state or application verification.

Inventory/vars → play/task selection → connection/become → module request → module result → target object read-back → handler/service effective state → workload verification.

Ansible automation proof-boundary map

BoundaryHealthy evidenceSuspicious evidence
Scope / identityExact source revision, hosts and execution identity are explicitSelector drift, stale inventory or wrong token changes scope/authority
OperationTool/provider action and per-host result are traceablePartial failure, hidden error semantics or environment differences are lost
Platform statePersistent and effective state are read backCommand/cmdlet success is mistaken for convergence
Workload proofOriginal service/application acceptance passesAutomation summary substitutes for actual runtime behavior

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5654

Confirmation

Confirm action

Continue?