Krikri::Play
Constructors
Instance methods
Every roles: entry's own defaults/main.yml and vars/main.yml,
merged in role order (a later role wins a name collision), kept as
two separate layers because Ansible ranks them either side of
play vars:.
Ansible loads ALL of a play's roles - and their vars/defaults
- into the variable manager when the play is SET UP, not when each
role's tasks reach the front of the queue, so a role can see the
vars of a role that runs AFTER it. Verified against ansible-core
2.19.4 (
roles: [alpha, beta], names defined only in beta:only_beta_var is definedinside alpha is True). This engine scoped them to the owning role and its dependents, so such a reference resolved to nothing - which is what made geerlingguy.php's ownwhen: php_packages is not definedrun a task Ansible skips (php_packageslives in buluma.php/vars/main.yml, a role that runs later in the same dependency chain).
Every roles: entry's own defaults/main.yml and vars/main.yml,
merged in role order (a later role wins a name collision), kept as
two separate layers because Ansible ranks them either side of
play vars:.
Ansible loads ALL of a play's roles - and their vars/defaults
- into the variable manager when the play is SET UP, not when each
role's tasks reach the front of the queue, so a role can see the
vars of a role that runs AFTER it. Verified against ansible-core
2.19.4 (
roles: [alpha, beta], names defined only in beta:only_beta_var is definedinside alpha is True). This engine scoped them to the owning role and its dependents, so such a reference resolved to nothing - which is what made geerlingguy.php's ownwhen: php_packages is not definedrun a task Ansible skips (php_packageslives in buluma.php/vars/main.yml, a role that runs later in the same dependency chain).
check_mode: at play scope - simulates every task in the play
(Ansible's play-level check_mode, 2.7+). A task's or block's
own check_mode: wins over it; nil means unset, inherit the --check
CLI flag. check_mode_expr is the raw text when the play-level value
is a templated expression, resolved per task at runtime (same
shape as Task#check_mode_expr).
check_mode: at play scope - simulates every task in the play
(Ansible's play-level check_mode, 2.7+). A task's or block's
own check_mode: wins over it; nil means unset, inherit the --check
CLI flag. check_mode_expr is the raw text when the play-level value
is a templated expression, resolved per task at runtime (same
shape as Task#check_mode_expr).
Play-level collections: keyword - the collections a bare module
name in this play's tasks resolves through (task-level collections:
overrides). Consulted by the controller collection-set awareness
check when deciding whether real could resolve a task's module at
all; empty when the play writes none (real's default search).
Play-level collections: keyword - the collections a bare module
name in this play's tasks resolves through (task-level collections:
overrides). Consulted by the controller collection-set awareness
check when deciding whether real could resolve a task's module at
all; empty when the play writes none (real's default search).
connection: at play scope - the connection plugin every task in
the play defaults to (Ansible's play-level connection keyword; runs
the whole play locally on the controller for "local"). Lower
precedence than any ansible_connection var an inventory/play var
sets, higher than the smart->ssh fallback; a task's own connection:
wins over it.
connection: at play scope - the connection plugin every task in
the play defaults to (Ansible's play-level connection keyword; runs
the whole play locally on the controller for "local"). Lower
precedence than any ansible_connection var an inventory/play var
sets, higher than the smart->ssh fallback; a task's own connection:
wins over it.
debugger: at play scope - always/never/on_failed/on_skipped/
on_unreachable. A task's own debugger: wins.
debugger: at play scope - always/never/on_failed/on_skipped/
on_unreachable. A task's own debugger: wins.
environment: at play scope - the env-var dict every task in the
play starts from (Ansible's play-level environment keyword; a
task's or block's own value wins per variable). Stored as a
one-element layer list so parse_block_task can stack block layers
on top with the same ambient-inheritance save/set/restore pattern
become/check_mode/timeout use; each task snapshots the list at
parse time (Task#inherited_environment).
environment: at play scope - the env-var dict every task in the
play starts from (Ansible's play-level environment keyword; a
task's or block's own value wins per variable). Stored as a
one-element layer list so parse_block_task can stack block layers
on top with the same ambient-inheritance save/set/restore pattern
become/check_mode/timeout use; each task snapshots the list at
parse time (Task#inherited_environment).
force_handlers: true play keyword - run notified handlers even
when a task failed on the host, exactly like the --force-handlers
CLI flag (Ansible honors both).
force_handlers: true play keyword - run notified handlers even
when a task failed on the host, exactly like the --force-handlers
CLI flag (Ansible honors both).
Whether the play actually wrote a gather_facts: key, as opposed to
defaulting to true. Only --gathering explicit needs the distinction:
under it, facts are gathered solely for plays that asked in so many
words, so "unset" and "explicitly true" cannot be conflated.
Whether the play actually wrote a gather_facts: key, as opposed to
defaulting to true. Only --gathering explicit needs the distinction:
under it, facts are gathered solely for plays that asked in so many
words, so "unset" and "explicitly true" cannot be conflated.
gather_subset: - which fact families the implicit fact gathering
collects (all, min, network, hardware, mounts, and !negations).
gather_subset: - which fact families the implicit fact gathering
collects (all, min, network, hardware, mounts, and !negations).
gather_timeout: / fact_path: - real play keywords feeding the
implicit setup call: per-family fact-collection timeout in seconds
(real default 10) and the directory *.fact custom facts are
gathered into ansible_local from (real default
/etc/ansible/facts.d).
gather_timeout: / fact_path: - real play keywords feeding the
implicit setup call: per-family fact-collection timeout in seconds
(real default 10) and the directory *.fact custom facts are
gathered into ansible_local from (real default
/etc/ansible/facts.d).
any_errors_fatal: - one host failing aborts the play for ALL of
them. max_fail_percentage: - abort once the share of failed hosts
is STRICTLY GREATER than this (verified: 1 of 3 hosts, i.e. 33.3%,
aborts at 33 but not at 34; 0 aborts on any failure; 100 never
does). Both are per serial: batch.
module_defaults: - per-module default arguments, keyed by module
name. Applies at play, block and task scope, nearest wins, and an
argument the task sets itself always wins over a default.
any_errors_fatal: - one host failing aborts the play for ALL of
them. max_fail_percentage: - abort once the share of failed hosts
is STRICTLY GREATER than this (verified: 1 of 3 hosts, i.e. 33.3%,
aborts at 33 but not at 34; 0 aborts on any failure; 100 never
does). Both are per serial: batch.
module_defaults: - per-module default arguments, keyed by module
name. Applies at play, block and task scope, nearest wins, and an
argument the task sets itself always wins over a default.
order: - the order hosts are processed in: inventory (default),
reverse_inventory, sorted, reverse_sorted, shuffle.
order: - the order hosts are processed in: inventory (default),
reverse_inventory, sorted, reverse_sorted, shuffle.
remote_user: at play scope - the connection user, i.e. what
ansible_user would say. A task's own remote_user: wins over it.
remote_user: at play scope - the connection user, i.e. what
ansible_user would say. A task's own remote_user: wins over it.
The collections: of the role whose tasks are being parsed (its
meta/main.yml); set only for the duration of that parse. Ansible gives a
role's tasks the role's own list instead of the play's, which shows in
an include_role not-found search-path prefix.
The collections: of the role whose tasks are being parsed (its
meta/main.yml); set only for the duration of that parse. Ansible gives a
role's tasks the role's own list instead of the play's, which shows in
an include_role not-found search-path prefix.
serial: - raw batch tokens, each either a count ("2") or a
percentage ("50%"). Empty means the play runs against every host at
once, which is what this engine always did.
serial: - raw batch tokens, each either a count ("2") or a
percentage ("50%"). Empty means the play runs against every host at
once, which is what this engine always did.
Play-level source position (start of the play's own YAML mapping) -
Ansible labels the implicit Gathering Facts task's task path:
line with the play's location, not a task's own.
Play-level source position (start of the play's own YAML mapping) -
Ansible labels the implicit Gathering Facts task's task path:
line with the play's location, not a task's own.
This play's own YAML source map - labels roles:-entry vars and the play's vars: with their defining positions.
This play's own YAML source map - labels roles:-entry vars and the play's vars: with their defining positions.
The role dirs whose entry task files are currently being pre-loaded for STATIC import_role: removed-action refusal (RoleLoader.preload_static_import_role) - the chain in flight, so a role that statically imports itself cannot recurse forever. Kept on the Play rather than a class-level set: two parses (including the minitest suite's concurrent test fibers) never share a Play object, while every nested static import in one parse does.
The role dirs whose entry task files are currently being pre-loaded for STATIC import_role: removed-action refusal (RoleLoader.preload_static_import_role) - the chain in flight, so a role that statically imports itself cannot recurse forever. Kept on the Play rather than a class-level set: two parses (including the minitest suite's concurrent test fibers) never share a Play object, while every nested static import in one parse does.
strategy: - linear (default) runs every host through a task
before any starts the next; free lets each host run the whole task
list independently.
strategy: - linear (default) runs every host through a task
before any starts the next; free lets each host run the whole task
list independently.
timeout: at play scope - the play's default per-task wall-clock
limit every task inherits (Ansible's play-level timeout: keyword;
live-verified vs 2.19.11: a play-level timeout: 2 fails each task
that runs past it). Also the ambient-inheritance carrier the block
parser uses: parse_block_task temporarily raises this to the
block's own value while its children parse, so precedence is
task > block > play with no parent pointers needed.
timeout: at play scope - the play's default per-task wall-clock
limit every task inherits (Ansible's play-level timeout: keyword;
live-verified vs 2.19.11: a play-level timeout: 2 fails each task
that runs past it). Also the ambient-inheritance carrier the block
parser uses: parse_block_task temporarily raises this to the
block's own value while its children parse, so precedence is
task > block > play with no parent pointers needed.
Appends a short String representation of this object which includes its class name and its object address.
class Person
def initialize(@name : String, @age : Int32)
end
end
Person.new("John", 32).to_s # => #<Person:0x10a199f20>
Origins for the play-level vars: entries and the play-wide role
layers (see Task#role_var_origins for what consumes them).
Origins for the play-level vars: entries and the play-wide role
layers (see Task#role_var_origins for what consumes them).
vars_files: - each entry is the list of candidate paths for one
slot: a plain entry is a one-element list, a nested list is
"first of these that exists". Paths may be templated, including
against facts, so they are resolved per host at run time.
vars_files: - each entry is the list of candidate paths for one
slot: a plain entry is a one-element list, a nested list is
"first of these that exists". Paths may be templated, including
against facts, so they are resolved per host at run time.