All articles
Sourced reference for running Ansible playbooks: forks and idempotence, inventory groups and variables, strategies, and the flags that change a run.
Ansible Guide is a sourced reference for the parts of Ansible that decide how a
playbook actually runs. The articles below cover six connected areas: the agentless
execution model and what the fork count really limits; how an inventory is structured
so that groups, variables and patterns scope a run; the linear, free and host_pinned
strategies that set task ordering; the ansible-playbook command-line
flags that change scope, preview and diagnostics on a given run; how Ansible Vault
keeps secrets encrypted in the repository; and where Ansible stops and Terraform starts.
Every guide is written against the official Ansible documentation, cited in each post, and is revised as that documentation changes rather than left to drift. The focus is deliberately narrow: execution behaviour, inventory design and the controls that shape a rollout, not a tour of every module. When you are sizing a run before widening it, the forks calculator turns a host count into a starting fork value and an estimated batch runtime.
Start with whichever question is in front of you. The posts cross-link to the ones they depend on, so a strategy question leads back to the inventory patterns and the fork count it relies on.
-
Ansible When Conditional Examples: Practical Patterns
Use Ansible when conditionals for facts, variables, loops and task results, with runnable YAML examples and fixes for common errors.
-
Ansible Roles vs Collections Explained: Which to Use
A role packages tasks for one job; a collection ships roles, modules and plugins as one versioned unit. How they differ and which to write first.
-
How to Use Ansible Vault: Encrypt, Edit and Run Secrets
Encrypt secrets with ansible-vault create, encrypt_string and --vault-id, keep variable names greppable, and supply passwords at run time safely.
-
Ansible and Terraform Together: Which Tool Owns Which Layer
Ansible configures hosts and runs operations, while Terraform provisions infrastructure. Compare their roles, overlap, and when to use both.
-
ansible-playbook Options: Flags That Change a Run
A working reference to ansible-playbook flags for scope, preview, task selection and diagnostics, with the check-mode and precedence traps that bite.
-
Ansible Inventory: Groups, Variables, and Patterns
How to structure an Ansible inventory: group hierarchies, where variables belong, how same-level groups merge, and the pattern syntax that scopes a run.
-
Ansible strategy: free vs linear vs host_pinned
strategy: free lets each host run ahead; linear, the default, moves task by task; host_pinned caps active hosts at forks. YAML and ansible.cfg examples.
-
Ansible Playbook Execution: How Forks and Idempotence Work
Trace an Ansible playbook from inventory to rerun. See what five default forks cap, how serial batches hosts, and how creates guards a task.