Ansible: Configuration as Code: glossary
100 terms, in plain words, with where each one is taught.
- --syntax-check (syntax-check)
- ansible-playbook --syntax-check: parses the playbook and reports YAML and structure errors without connecting to any host. Lesson 9.5
- ad-hoc command (ad-hoc, ad-hoc commands)
- A single module run against a set of hosts from the command line, without a playbook: ansible web -m ansible.builtin.ping. Lesson 9.2
- AES-256 (AES, AES256)
- The Advanced Encryption Standard with a 256-bit key: the cipher ansible-vault uses, shown as AES256 in the file header. Lesson 9.23
- agent (configuration management) (configuration agent)
- A program that runs all the time on every managed server and talks to a central server. Many configuration tools work this way; Ansible does not. Lesson 9.1
- agentless
- Needing no program of its own running on the managed servers. Ansible connects over plain SSH, copies a small Python program per task, runs it and removes it. Lesson 9.1
- Ansible (ansible)
- An agentless configuration management tool: from one machine it connects to servers over SSH and brings each one to the state described in YAML files, changing only what differs. On Ubuntu 26.04
apt install ansiblegives ansible 13.1.0 (with ansible-core 2.20.1). Lesson 9.1 - ansible (package) (ansible package)
- The package that adds a curated set of collections (ansible.posix, community.general and many more) on top of ansible-core. Version 13.1.0 on Ubuntu 26.04. Lesson 9.1
- Ansible Galaxy (Galaxy, galaxy.ansible.com)
- The public hub where roles and collections are published; ansible-galaxy is the command that installs from it. Lesson 9.21
- ansible_managed
- A text from ansible.cfg ("Ansible managed" by default) to put at the top of templated files, so nobody edits them by hand. Lesson 9.11
- ansible-core
- The engine: the ansible, ansible-playbook, ansible-vault, ansible-galaxy (and other) commands plus the builtin modules (ansible.builtin.*). Version 2.20.1 on Ubuntu 26.04. Lesson 9.1
- ansible-lint
- A checker for playbooks and roles: each finding has a rule id (fqcn, no-handler, risky-file-permissions...) and belongs to a profile from min to production. Lesson 9.30
- ansible-pull
- The command that inverts Ansible's model: the host clones a repository and applies its playbook to itself, usually from a timer. Lesson 9.34
- ansible-vault (vault (Ansible), Ansible Vault)
- The command that encrypts files or single values with a password so secrets can live in git; Ansible decrypts them at run time. Lesson 9.23
- ansible.cfg
- Ansible's settings file. The first one found wins: $ANSIBLE_CONFIG, ./ansible.cfg in the current directory, ~/.ansible.cfg, /etc/ansible/ansible.cfg.
ansible --versionprints which one is in use;ansible-config dump --only-changedlists what it changes. Lesson 9.2 - assert (module) (ansible.builtin.assert)
- A module that fails the host with a message when a condition (that:) is false: a check of your own assumptions in the middle of a play. Lesson 9.30
- AWX (Ansible Automation Platform, Red Hat Ansible Automation Platform)
- A web service that runs Ansible for a team: stored credentials, permissions on who may run what where, schedules and a log of every run. Red Hat sells it as Ansible Automation Platform. Lesson 9.34
- become (Ansible) (become: true, privilege escalation)
- Running a task as another user, root by default, through sudo. become: true on a play or task; -K asks for the sudo password. Lesson 9.5
- blockinfile (ansible.builtin.blockinfile)
- The module that keeps a block of lines between # BEGIN ANSIBLE MANAGED BLOCK and # END markers in a file, replacing it on later runs. Lesson 9.11
- changed_when (failed_when)
- Task keywords that decide the task's status from a condition: changed_when: false for a read-only command, failed_when for your own failure rule. Lesson 9.14
- check mode (--check, dry run)
- ansible-playbook --check: every module reports what it would change without changing it. command and shell are skipped. Lesson 9.14
- collection (Ansible) (Ansible collection, Ansible collections)
- A package of modules, roles and plugins under a namespace, such as ansible.posix or community.general. Installed with ansible-galaxy collection install. Lesson 9.21
- configuration management
- Describing how servers must be set up (packages, files, users, services) and letting a tool bring every server to that description and keep it there. Lesson 9.1
- connection variables (ansible_host, ansible_user, ansible_port)
- Variables that change how Ansible reaches a host: ansible_host (the address), ansible_user (the login), ansible_port, the key file. Lesson 9.2
- control node
- The machine Ansible runs on: it holds the project files and connects out to the managed hosts. In the lab, your box. Lesson 9.1
- creates / removes (creates:, removes:)
- Arguments of the command and shell modules: skip the command when a file already exists (creates) or no longer exists (removes), which makes it idempotent. Lesson 9.5
- day-2 operations (day 2 operations, Day-2 operations as code)
- Everything after a server is first set up: patching, rotating certificates, restarts, user changes. Done as playbooks, they are reviewed and repeatable. Lesson 9.34
- declarative
- Saying what the result must be and letting the tool work out the steps. Most Ansible tasks are written this way. Lesson 9.1
- default (filter) (default(), | default)
- The filter that gives a value when a variable is not set: {{ timeout | default(30) }}. Without it, a missing variable stops the task with an error. Lesson 9.11
- delegate_to (delegation)
- Run a task on another host (the load balancer, localhost) while keeping the current host's variables, such as its IP address. Lesson 9.26
- desired state
- The end result you describe ("nginx installed, this file with this content, the service running"), as opposed to the steps to get there. Lesson 9.1
- diff mode (--diff)
- ansible-playbook --diff: show the before and after of every file a task changes. With --check, a full preview of a change. Lesson 9.14
- drain (load balancer) (drain from the pool)
- Taking a server out of a load balancer's pool so no new requests reach it, before changing it. Lesson 9.26
- drift (configuration drift)
- Differences that build up between servers that should be identical, from hand edits, half-failed runs or upgrades done on one host only. Re-running the same playbook, and
--check --diffto see it first, is how Ansible finds and removes it. Lesson 9.1 - EDITOR ($EDITOR)
- The environment variable that picks the text editor programs such as ansible-vault edit and git open (export EDITOR=nano). Lesson 9.23
- encrypt_string
- ansible-vault encrypt_string encrypts one value to paste into a normal YAML file as a !vault | block. Lesson 9.23
- extra vars (--extra-vars)
- Variables given on the command line with -e. They beat every other source, including role vars. Lesson 9.8
- facts (Ansible) (ansible_facts, Ansible facts)
- What Ansible learns about each host at the start of a play: memory, CPUs, IP addresses, OS version, and more, in ansible_facts.
ansible web-1 -m ansible.builtin.setupprints them all. Lesson 9.8 - flush_handlers (meta: flush_handlers)
- ansible.builtin.meta: flush_handlers runs the handlers queued so far right away, instead of at the end of the play. Lesson 9.14
- force_handlers (--force-handlers)
- Run notified handlers even on hosts where a later task failed. Without it those handlers are dropped and the change stays unapplied. Lesson 9.14
- FQCN (fully qualified collection name)
- The full name of a module, with the collection it comes from: ansible.builtin.copy rather than copy. ansible-lint's production profile requires it. Lesson 9.5
- gather_facts (Gathering Facts)
- The automatic first task of a play that collects facts from every host. gather_facts: false skips it when a play does not need them. Lesson 9.5
- golden image (golden images)
- A disk image of a fully set-up server, built once and copied to make every new server. Fast and identical, but every change means building a new image. Lesson 9.1
- group (inventory) (host group, inventory group)
- A named set of hosts in an inventory, such as [web]. Every host is also in the built-in groups all and, if in no other group, ungrouped. Lesson 9.2
- group_vars (group_vars/)
- A directory next to the inventory or the playbook with one YAML file (or directory) per group, holding that group's variables. group_vars/all.yml applies to every host. Lesson 9.2
- handler (Ansible) (Ansible handler, Ansible handlers, RUNNING HANDLER)
- A task that runs only when notified by a task that reported changed, once, at the end of the play (or at flush_handlers). The usual way to reload a service after its config changed. Lesson 9.14
- host pattern (host patterns)
- How you pick hosts: a group or host name, or combinations: web:db (either), web:&canary (both), web:!web-2 (web without web-2). Quote it in bash.
--list-hostsshows the result without running anything. Lesson 9.2 - host variable (host variables, host vars)
- A variable set for one host only: on its line in an INI inventory (web-1 app_port=8080) or in host_vars/web-1.yml. Lesson 9.2
- host_vars (host_vars/)
- A directory next to the inventory or the playbook with one YAML file per host, holding that host's variables. Lesson 9.2
- idempotent (idempotency, idempotence)
- Safe to run again: a second run on a host that is already right changes nothing. Ansible modules compare first and act only on a difference, so the second run reports changed=0. Lesson 9.1
- immutable infrastructure
- Servers that are never changed: a new version is a new image and new servers replace the old ones, so nothing can drift. Lesson 9.34
- imperative
- Saying the steps to run, in order, like a shell script. The command and shell modules are the imperative part of Ansible. Lesson 9.1
- implicit localhost
- The control node itself, which Ansible can always target as localhost even when the inventory does not list it, without SSH. Lesson 9.2
- import vs include (import_role, include_role, import_tasks)
- import_* is static: read when the playbook loads, visible to tags and --list-tasks. include_* is dynamic: loaded when the task runs, so it can loop or depend on a result. Lesson 9.21
- INI (INI format)
- A simple text format of [sections] and key=value lines. Ansible inventories are often written in it: [web] then one host per line. Lesson 9.2
- interpreter discovery (interpreter_python, ansible_python_interpreter)
- Ansible looking for a Python on each host and warning which one it picked. interpreter_python = auto_silent in ansible.cfg keeps the search and drops the warning. Lesson 9.2
- inventory (Ansible) (Ansible inventory, inventory file, inventory.ini)
- The list of servers Ansible manages, grouped (web, db...), with optional variables per host or group. An INI or YAML file, or a script.
ansible-inventory --graphshows the tree Ansible understood. Lesson 9.2 - Jinja2 (Jinja, jinja2)
- The template language Ansible uses: {{ expression }} prints a value, {% for %} and {% if %} add logic, {# #} is a comment. Lesson 9.11
- Jinja2 filter (Jinja2 filters, Jinja filter)
- A function applied with |, chained left to right: {{ name | upper }}, {{ timeout | default(30) }}, {{ pkgs | join(", ") }}. Lesson 9.11
- lineinfile (ansible.builtin.lineinfile)
- The module that makes sure one line is in a file, replacing the last line matching regexp or adding it at the end. For files you share with others. Lesson 9.11
- lint profile (profile (ansible-lint), production profile)
- A level of ansible-lint strictness: min, basic, moderate, safety, shared, production. The output says the last profile the project met. Lesson 9.30
- loop (Ansible) (loop:, with_items, loop_control)
- A task keyword that runs the task once per item of a list, with the current item in {{ item }}. Lesson 9.8
- magic variables (inventory_hostname, hostvars)
- Variables Ansible always sets: inventory_hostname (the host's name), groups (every group's hosts), hostvars (every host's variables and facts). Lesson 9.8
- managed node (managed nodes, managed host, managed hosts)
- A server Ansible configures. It needs only sshd, Python 3 and a user that can sudo; nothing Ansible-specific is installed on it. Lesson 9.1
- max_fail_percentage (any_errors_fatal)
- How many hosts of a batch may fail before the play stops; 0 means the first failure stops the rollout. any_errors_fatal does the same for a whole play. Lesson 9.26
- Missing sudo password
- The error when become needs sudo and sudo on the host wants a password Ansible was not given; -K asks for it. Lesson 9.30
- mutable infrastructure
- Servers that live long and are changed in place: patched, reconfigured, upgraded. Their risk is drift; re-running configuration management is the cure. Lesson 9.34
- no_log (no_log: true)
- A task keyword that replaces the task's result in all output and logs with a censored message, at every verbosity. For every task that handles a secret. Lesson 9.23
- noqa (# noqa)
- A comment that silences one lint rule on one line (# noqa: rule-id). For a reviewed exception, not to make the linter pass. Lesson 9.30
- notify (Ansible) (notify:)
- The task keyword that queues a handler by name when the task reports changed. Lesson 9.14
- ok (task status) (changed (task status))
- ok: the host already matched, nothing done. changed: the module had to change something. A correct playbook shows changed only when something really differed. Lesson 9.5
- one owner per setting (every setting has exactly one owner)
- The rule that each setting is managed by exactly one tool; two tools managing the same thing undo each other on every run. Lesson 9.34
- Origin (Ansible error) (Origin:)
- The line under an Ansible error that points at the file, line and column of the problem, followed by the line itself with a caret under the spot. Lesson 9.30
- parent group (:children)
- A group made of other groups: [prod:children] followed by web and db makes prod contain every host of both. Lesson 9.2
- ping (module) (ansible.builtin.ping)
- The module that checks Ansible can log in and run Python on a host, and answers "pong". Not a network ping. Lesson 9.2
- play (Ansible) (Ansible play)
- One block of a playbook: a host pattern (hosts:), options such as become, and a list of tasks run on those hosts. Lesson 9.5
- PLAY RECAP
- The summary at the end of a run: one line per host with ok, changed, unreachable, failed, skipped, rescued and ignored counts. Lesson 9.5
- playbook (playbooks, Ansible playbook)
- A YAML file with a list of plays: which hosts, and which tasks to run on them, in order. Run with ansible-playbook. Lesson 9.5
- pre_tasks / post_tasks (pre_tasks, post_tasks)
- Task lists that run before the roles and tasks of a play, and after them (including their handlers). In a rolling deploy: drain first, health check and re-enable after. Lesson 9.26
- pull model (pull mode)
- Each server fetches the configuration and applies it to itself on a schedule. ansible-pull works this way. Lesson 9.1
- push model (push mode)
- The control node connects to the servers and applies the change now, which is how ansible-playbook works: one clear moment per change. Lesson 9.1
- register (Ansible) (register:, registered variable)
- Saving a task's result (rc, stdout, changed...) in a variable so later tasks can use or test it. Lesson 9.8
- rekey (ansible-vault rekey)
- ansible-vault rekey re-encrypts vault files with a new password: how you rotate the vault password. Lesson 9.23
- requirements.yml
- The file that lists the roles and collections a project needs, with pinned versions, installed with ansible-galaxy install -r requirements.yml. Lesson 9.21
- role (Ansible) (Ansible role, Ansible roles)
- A reusable unit with a fixed directory layout: tasks, handlers, templates, files, defaults, vars, meta. Applied to hosts by a play.
ansible-galaxy role init roles/namecreates the skeleton. Lesson 9.21 - role defaults (defaults/main.yml)
- A role's knobs, in defaults/main.yml: the lowest precedence of all, so any inventory or play value overrides them. Lesson 9.21
- role vars (vars/main.yml)
- A role's internal values, in vars/main.yml, at high precedence: inventory values cannot override them. Lesson 9.21
- rolling deploy (rolling deploys, rolling restart)
- Changing a load-balanced tier one host (or one batch) at a time: drain, change, check, put back. A bad change costs one host, not all of them. Lesson 9.26
- run_once
- Run a task on only the first host of the batch, for example one database migration for the whole release. Lesson 9.26
- serial (Ansible) (serial:)
- A play keyword that runs the whole play on a batch of hosts at a time (1, a number, or a percentage) before starting the next batch. Lesson 9.26
- set_fact
- A module that sets a variable for the host during the run, at high precedence; it lasts until the end of the playbook. Lesson 9.8
- Labels on tasks, roles or plays. --tags config runs only what is tagged config; --skip-tags skips it. always and never are special. Lesson 9.14
- task (Ansible) (Ansible task, Ansible tasks)
- One step of a play: a name and one module call with its arguments, run on every host of the play. Lesson 9.5
- trim_blocks
- A setting the template module turns on: the newline after a {% ... %} line is removed, so a line that only holds a statement leaves no blank line. Lesson 9.11
- UNREACHABLE (UNREACHABLE!)
- Ansible could not get a working SSH session to the host, so no module ran: host key, address, user or key problems. Different from a FAILED task. Lesson 9.30
- until / retries / delay (until:, retries:, delay:)
- Task keywords that repeat a task until a condition on its registered result is true, up to retries times, delay seconds apart. Lesson 9.26
- validate (Ansible) (validate:)
- An argument of copy and template: a command that tests the new file before it replaces the old one, with %s as its path (nginx -t -c %s, visudo -cf %s). Lesson 9.11
- variable precedence (Ansible) (Ansible variable precedence)
- The order that decides which value wins when a variable is set in several places. Roughly: role defaults < inventory < group_vars < host_vars < facts < play vars < role vars < set_fact/register < extra vars. Lesson 9.8
- vault ID (--vault-id, vault IDs)
- A label for a vault password (prod, dev) so different environments use different passwords; shown in the header as $ANSIBLE_VAULT;1.2;AES256;prod. Lesson 9.23
- vault password file (vault_password_file, --vault-password-file)
- A file (mode 600, outside the repository) whose first line is the vault password; if it is executable, Ansible runs it and reads the password from its output. Lesson 9.23
- when (condition) (when:)
- A task keyword with a condition; the task runs only on hosts where it is true and shows skipping elsewhere. Written without {{ }}. Lesson 9.8