Ansible: Interview Set

0.0(0)
Studied by 0 people
call kaiCall Kai
Locked
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/41

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 3:18 AM on 7/23/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

42 Terms

1
New cards

Module

The actual unit of work a task calls (apt, copy, service, template, file)

2
New cards

Role

Packages tasks, vars, templates, files, and handlers around one piece of functionality — reusable, like a Terraform child module

3
New cards

Plugin

Code that extends Ansible's core behavior — modules, connection, inventory, callback, filter are all plugin types

4
New cards

Collection

The versioned, installable package that ships plugins, modules, and roles together — like a package on Galaxy

5
New cards

Namespace

The top-level publisher/org identifier in a collection name — the "amazon" in amazon.aws

6
New cards

FQCN

namespace.collection.module — the full reference to a module outside Ansible core, e.g. amazon.aws.ec2_instance

7
New cards

Playbook

The top-level YAML file that defines what plays/tasks to run — roles are called from here

8
New cards

Play

One execution unit — targets a set of hosts and runs a list of tasks against them

9
New cards

Task

One action within a play — a module call plus optional modifiers

10
New cards

Handler

A task that only runs when notified by another task via notify: — e.g. restart a service after its config changes

11
New cards

Template

A Jinja2 (.j2) file rendered with variables substituted before being written to the target host

12
New cards

template: vs copy:

copy moves a file as-is, no substitution

13
New cards

Inventory

The list of managed hosts Ansible knows about — INI or YAML format, defaults to SSH

14
New cards

hostvars

Magic variable — dictionary of every host's variables, the mechanism for reading another host's data from wherever you currently are

15
New cards

groups

Magic variable — dictionary of every inventory group and the hosts in each

16
New cards

Idempotency

An operation is idempotent if running it once produces the same result as running it repeatedly

17
New cards

ansible.cfg precedence

$ANSIBLE_CONFIG env var > ./ansible.cfg > ~/.ansible.cfg > /etc/ansible/ansible.cfg

18
New cards

host_key_checking

ansible.cfg [defaults] setting — disables SSH host-key verification prompts, common in disposable lab environments

19
New cards

Variable precedence (low to high)

role defaults < inventory vars < playbook group/host vars < play vars < task vars < extra_vars (-e)

20
New cards

when:

Task modifier — conditional, only runs the task if the expression is true

21
New cards

register:

Task modifier — captures a task's output into a variable for later use

22
New cards

delegate_to:

Task modifier — runs this one task on a different host than the play targets, without a separate play

23
New cards

loop:

Task modifier — runs the task once per item in a list (modern replacement for with_items)

24
New cards

block / rescue / always

Ansible's try / catch / finally — group tasks, handle failures, always run cleanup

25
New cards

state:

A common module parameter (not a task modifier) — declares desired end-state, e.g. present/absent/started/stopped

26
New cards

lineinfile + regexp:

Finds a line matching a pattern in a file and replaces or appends it — YAML-wrapped sed

27
New cards

connection: local

Runs a task on the control node itself instead of SSHing out — common for local report/file generation

28
New cards

Ad-hoc command

ansible -m -a "" — runs one module against hosts without a playbook

29
New cards

ansible-vault

Encrypts secrets (passwords, keys) inside playbooks or vars files

30
New cards

Grouping

A host can belong to multiple groups at once (e.g. functional + geographic)

31
New cards

ansible_user

Correct connection variable for SSH user — not ansible_username

32
New cards

apt / yum / dnf

Install/manage packages on Debian or RHEL-family systems

33
New cards

shell vs command

command runs without shell processing (no pipes/redirects)

34
New cards

become:

Task or play modifier — privilege escalation (sudo), defaults to root

35
New cards

ignore_errors:

Task modifier — continues the play even if this task fails

36
New cards

tags:

Task modifier — labels a task for selective run/skip via --tags/--skip-tags

37
New cards

gather_facts:

Play-level setting — collects system info (OS, IP, hostname, memory, CPU) at the start of a play

38
New cards

serial:

Play-level setting — how many hosts to run against at once, for rolling updates

39
New cards

changed_when: / failed_when:

Task modifiers — override how Ansible decides a task "changed" or "failed", useful for command/shell tasks

40
New cards

Check mode (--check)

Reports what would change without actually making changes

41
New cards

Syntax check (--syntax-check)

Confirms playbook syntax is correct without running it

42
New cards

ansible-inventory --list / --graph

Inspect what Ansible actually resolves as your inventory structure