Pcornel
Automation · Ansible

Agentless Automation

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

Back to the Topic

Answer

Ansible is commonly agentless: the control side connects on demand using connection plugins instead of depending on a persistent Ansible daemon on each managed node.

Remember

  • Agentless ≠ no remote dependency; SSH/WinRM/network APIs and target runtimes can still be required.
  • No persistent agent ≠ no local execution; transferred or remotely invoked code can execute on the target.
  • Transport open ≠ authorized automation; credentials and privilege remain separate.
  • Agentless ≠ stateless outcome; target configuration persists and can drift after the run.

First checks

  • ansible all -m ping — SSH connectivity
  • ControlPersist/pipelining settings — performance
  • No agents installed — simplicity

Verify in this order

controller → SSH session → temp module → result

Where it usually breaks

Agentless connectivity proves Ansible can reach an execution boundary without a persistent agent; it does not prove dependency-free or drift-free operation.

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

Agentless Automation Ansible boundary map

BoundaryHealthy evidenceSuspicious evidence
Inputs / selectionCorrect inventory, hosts, variables/facts and content are explicitWrong scope, stale facts, hidden precedence or content-version drift
ExecutionConnection, privilege, module/task context and ordering match intentUnreachable, wrong execution host, privilege/plugin failure or misleading skip/change state
Result semanticsPer-host/item results are preserved and interpreted correctlyAggregate recap hides partial/skipped/handled failures
Target proofResource/workload read-back and rerun confirm convergenceGreen Ansible status treated as end-to-end acceptance

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

Confirmation

Confirm action

Continue?