1/41
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced | Call with Kai | Chat |
|---|
No analytics yet
Send a link to your students to track their progress
Module
The actual unit of work a task calls (apt, copy, service, template, file)
Role
Packages tasks, vars, templates, files, and handlers around one piece of functionality — reusable, like a Terraform child module
Plugin
Code that extends Ansible's core behavior — modules, connection, inventory, callback, filter are all plugin types
Collection
The versioned, installable package that ships plugins, modules, and roles together — like a package on Galaxy
Namespace
The top-level publisher/org identifier in a collection name — the "amazon" in amazon.aws
FQCN
namespace.collection.module — the full reference to a module outside Ansible core, e.g. amazon.aws.ec2_instance
Playbook
The top-level YAML file that defines what plays/tasks to run — roles are called from here
Play
One execution unit — targets a set of hosts and runs a list of tasks against them
Task
One action within a play — a module call plus optional modifiers
Handler
A task that only runs when notified by another task via notify: — e.g. restart a service after its config changes
Template
A Jinja2 (.j2) file rendered with variables substituted before being written to the target host
template: vs copy:
copy moves a file as-is, no substitution
Inventory
The list of managed hosts Ansible knows about — INI or YAML format, defaults to SSH
hostvars
Magic variable — dictionary of every host's variables, the mechanism for reading another host's data from wherever you currently are
groups
Magic variable — dictionary of every inventory group and the hosts in each
Idempotency
An operation is idempotent if running it once produces the same result as running it repeatedly
ansible.cfg precedence
$ANSIBLE_CONFIG env var > ./ansible.cfg > ~/.ansible.cfg > /etc/ansible/ansible.cfg
host_key_checking
ansible.cfg [defaults] setting — disables SSH host-key verification prompts, common in disposable lab environments
Variable precedence (low to high)
role defaults < inventory vars < playbook group/host vars < play vars < task vars < extra_vars (-e)
when:
Task modifier — conditional, only runs the task if the expression is true
register:
Task modifier — captures a task's output into a variable for later use
delegate_to:
Task modifier — runs this one task on a different host than the play targets, without a separate play
loop:
Task modifier — runs the task once per item in a list (modern replacement for with_items)
block / rescue / always
Ansible's try / catch / finally — group tasks, handle failures, always run cleanup
state:
A common module parameter (not a task modifier) — declares desired end-state, e.g. present/absent/started/stopped
lineinfile + regexp:
Finds a line matching a pattern in a file and replaces or appends it — YAML-wrapped sed
connection: local
Runs a task on the control node itself instead of SSHing out — common for local report/file generation
Ad-hoc command
ansible
ansible-vault
Encrypts secrets (passwords, keys) inside playbooks or vars files
Grouping
A host can belong to multiple groups at once (e.g. functional + geographic)
ansible_user
Correct connection variable for SSH user — not ansible_username
apt / yum / dnf
Install/manage packages on Debian or RHEL-family systems
shell vs command
command runs without shell processing (no pipes/redirects)
become:
Task or play modifier — privilege escalation (sudo), defaults to root
ignore_errors:
Task modifier — continues the play even if this task fails
tags:
Task modifier — labels a task for selective run/skip via --tags/--skip-tags
gather_facts:
Play-level setting — collects system info (OS, IP, hostname, memory, CPU) at the start of a play
serial:
Play-level setting — how many hosts to run against at once, for rolling updates
changed_when: / failed_when:
Task modifiers — override how Ansible decides a task "changed" or "failed", useful for command/shell tasks
Check mode (--check)
Reports what would change without actually making changes
Syntax check (--syntax-check)
Confirms playbook syntax is correct without running it
ansible-inventory --list / --graph
Inspect what Ansible actually resolves as your inventory structure