class

Krikri::ActionPlugin

Inherits Reference < Object

Constructors

new(params : Hash(String, String), vars : Hash(String, JSON::Any), host : Host, inventory : Inventory | Nil = nil, task_host : Host | Nil = nil, deadline : Time::Instant | Nil = nil, action_name : String | Nil = nil)
Source

Instance methods

action_name

The module spelling AS WRITTEN in the task - the ArgspecValidator prints it in the Unsupported-parameters message exactly like real (a bare synchronize: must not dress up as the resolved FQCN); nil only for direct test construction.

Source
deadline

The task's own timeout: wall-clock limit as an absolute instant (nil when the task carries none). Real's TASK_TIMEOUT alarm wraps all of handler.run - the action plugin included - so a long-running action can honor the same deadline the executor guards the whole dispatch with (only pause: reads it today; its sleep truncates to the deadline so its console lines survive onto the timed-out result, see PauseActionPlugin).

Source
execute

Execute action on controller Returns: modified params to send to remote plugin, or nil if action failed

Source
host
Source
host=(host : Host)
Source
inventory

The run's ONE shared Inventory instance (nil only in contexts that never had one) - only meaningful for plugins that mutate controller- side state across plays (add_host:). Passed through execute_action's own optional parameter; most action plugins ignore it entirely.

Source
params
Source
params=(params : Hash(String, String))
Source
should_run?

Check if this plugin should run Some action plugins only run under certain conditions

Source
task_host

The task's OWN host (the play's hosts: entry) when the task carries delegate_to: - nil when it doesn't (and always nil-equal to @host then, since resolve_delegate_host falls back to the original host). Only synchronize reads it: Ansible runs its rsync on the delegate but qualifies the OTHER rsync end from the ORIGINAL host's connection details, which the delegate-resolved @host alone can't reconstruct.

Source
task_host=(task_host : Host | Nil)

The task's OWN host (the play's hosts: entry) when the task carries delegate_to: - nil when it doesn't (and always nil-equal to @host then, since resolve_delegate_host falls back to the original host). Only synchronize reads it: Ansible runs its rsync on the delegate but qualifies the OTHER rsync end from the ORIGINAL host's connection details, which the delegate-resolved @host alone can't reconstruct.

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