class

Krikri::Play

Inherits Reference < Object

Constructors

new(name : String, hosts : String | Array(String))
Source

Instance methods

all_role_default_origins
Source
all_role_default_origins=(all_role_default_origins : Hash(String, VarOrigin))
Source
all_role_defaults

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 defined inside 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 own when: php_packages is not defined run a task Ansible skips (php_packages lives in buluma.php/vars/main.yml, a role that runs later in the same dependency chain).
Source
all_role_defaults=(all_role_defaults : Hash(String, JSON::Any))

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 defined inside 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 own when: php_packages is not defined run a task Ansible skips (php_packages lives in buluma.php/vars/main.yml, a role that runs later in the same dependency chain).
Source
all_role_var_origins
Source
all_role_var_origins=(all_role_var_origins : Hash(String, VarOrigin))
Source
all_role_vars
Source
all_role_vars=(all_role_vars : Hash(String, JSON::Any))
Source
any_errors_fatal=(any_errors_fatal : Bool)
Source
any_errors_fatal?
Source
become=(become : Bool)
Source
become?
Source
become_flags
Source
become_flags=(become_flags : String | Nil)
Source
become_user
Source
become_user=(become_user : String | Nil)
Source
check_mode=(check_mode : Bool | Nil)

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).

Source
check_mode?

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).

Source
check_mode_expr
Source
check_mode_expr=(check_mode_expr : String | Nil)
Source
collections

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).

Source
collections=(collections : Array(String))

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).

Source
connection

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.

Source
connection=(connection : String | Nil)

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.

Source
debugger

debugger: at play scope - always/never/on_failed/on_skipped/ on_unreachable. A task's own debugger: wins.

Source
debugger=(debugger : String | Nil)

debugger: at play scope - always/never/on_failed/on_skipped/ on_unreachable. A task's own debugger: wins.

Source
environment_layers

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).

Source
environment_layers=(environment_layers : Array(Hash(String, String) | String))

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).

Source
fact_path
Source
fact_path=(fact_path : String | Nil)
Source
force_handlers=(force_handlers : Bool)

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).

Source
force_handlers?

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).

Source
gather_facts=(gather_facts : Bool)
Source
gather_facts?
Source
gather_facts_set=(gather_facts_set : Bool)

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.

Source
gather_facts_set?

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.

Source
gather_subset

gather_subset: - which fact families the implicit fact gathering collects (all, min, network, hardware, mounts, and !negations).

Source
gather_subset=(gather_subset : Array(String))

gather_subset: - which fact families the implicit fact gathering collects (all, min, network, hardware, mounts, and !negations).

Source
gather_timeout

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).

Source
gather_timeout=(gather_timeout : Int64 | Nil)

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).

Source
handlers
Source
handlers=(handlers : Array(Task))
Source
hosts
Source
hosts=(hosts : String | Array(String))
Source
max_fail_percentage
Source
max_fail_percentage=(max_fail_percentage : Float64 | Nil)
Source
module_defaults

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.

Source
module_defaults=(module_defaults : Hash(String, Hash(String, String)))

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.

Source
name
Source
name=(name : String)
Source
order

order: - the order hosts are processed in: inventory (default), reverse_inventory, sorted, reverse_sorted, shuffle.

Source
order=(order : String | Nil)

order: - the order hosts are processed in: inventory (default), reverse_inventory, sorted, reverse_sorted, shuffle.

Source
remote_user

remote_user: at play scope - the connection user, i.e. what ansible_user would say. A task's own remote_user: wins over it.

Source
remote_user=(remote_user : String | Nil)

remote_user: at play scope - the connection user, i.e. what ansible_user would say. A task's own remote_user: wins over it.

Source
role_meta_collections

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.

Source
role_meta_collections=(role_meta_collections : Array(String) | Nil)

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.

Source
serial

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.

Source
serial=(serial : Array(String))

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.

Source
source_file

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.

Source
source_file=(source_file : String | Nil)

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.

Source
source_line
Source
source_line=(source_line : Int32)
Source
source_map

This play's own YAML source map - labels roles:-entry vars and the play's vars: with their defining positions.

Source
source_map=(source_map : YamlSourceMap | Nil)

This play's own YAML source map - labels roles:-entry vars and the play's vars: with their defining positions.

Source
static_preload_chain

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.

Source
static_preload_chain=(static_preload_chain : Set(String))

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.

Source
strategy

strategy: - linear (default) runs every host through a task before any starts the next; free lets each host run the whole task list independently.

Source
strategy=(strategy : String | Nil)

strategy: - linear (default) runs every host through a task before any starts the next; free lets each host run the whole task list independently.

Source
tags
Source
tags=(tags : Array(String))
Source
task_timeout

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.

Source
task_timeout=(task_timeout : Int64 | Nil)

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.

Source
task_timeout_expr
Source
task_timeout_expr=(task_timeout_expr : String | Nil)
Source
tasks
Source
tasks=(tasks : Array(Task))
Source
to_s(io : IO) : Nil

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>
Source
var_origins

Origins for the play-level vars: entries and the play-wide role layers (see Task#role_var_origins for what consumes them).

Source
var_origins=(var_origins : Hash(String, VarOrigin))

Origins for the play-level vars: entries and the play-wide role layers (see Task#role_var_origins for what consumes them).

Source
vars
Source
vars=(vars : Hash(String, JSON::Any))
Source
vars_files

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.

Source
vars_files=(vars_files : Array(Array(String)))

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.

Source
vars_prompt

vars_prompt: - name/prompt/private/default per entry, asked before the play runs.

Source
vars_prompt=(vars_prompt : Array(Hash(String, String)))

vars_prompt: - name/prompt/private/default per entry, asked before the play runs.

Source