class

Krikri::ActionPluginManager

Inherits Reference < Object

Constants

ACTION_PLUGINS = {"ansible.builtin.template" => TemplateActionPlugin, "template" => TemplateActionPlugin, "ansible.builtin.debug" => DebugActionPlugin, "debug" => DebugActionPlugin, "ansible.builtin.assert" => AssertActionPlugin, "assert" => AssertActionPlugin, "ansible.builtin.fail" => FailActionPlugin, "fail" => FailActionPlugin, "ansible.builtin.set_fact" => SetFactActionPlugin, "set_fact" => SetFactActionPlugin, "ansible.builtin.pause" => PauseActionPlugin, "pause" => PauseActionPlugin, "ansible.builtin.add_host" => AddHostActionPlugin, "add_host" => AddHostActionPlugin, "ansible.posix.synchronize" => SynchronizeActionPlugin, "synchronize" => SynchronizeActionPlugin}

Map of module names to their action plugin classes

CONTROLLER_ONLY_MODULES = Set {"ansible.builtin.debug", "debug", "ansible.builtin.assert", "assert", "ansible.builtin.fail", "fail", "ansible.builtin.set_fact", "set_fact", "ansible.builtin.pause", "pause", "ansible.posix.synchronize", "synchronize", "ansible.builtin.add_host", "add_host"}

Modules whose action plugin ALWAYS returns ActionResult.final - no module ever runs afterward, local or remote (unlike template:, whose action plugin only rewrites params before a real module still executes to actually write the file). PluginManager's own pre-upload pass (collect_required_plugins) uses this to skip putting these 7 in a remote host's upload set entirely - nothing in the normal execution path ever calls get_local_plugin_path for them, so uploading them was pure waste. Kept as a fixed set rather than derived from ACTION_PLUGINS, since template: is a real counter-example living in the same map. Unlike the others, add_host has no plugins/*.cr binary at all (there is nothing a target-side add_host process could ever do), so it relies on this set.

Class methods

execute_action(module_name : String, params : Hash(String, String), vars : Hash(String, JSON::Any), host : Host, inventory : Inventory | Nil = nil, task_host : Host | Nil = nil, check_mode : Bool = false) : ActionResult

Execute action plugin on controller Returns ActionResult with modified params or error inventory is the run's shared Inventory, passed only so plugins that mutate run-scoped state (add_host:) reach the same object every play's hosts:-pattern resolution reads from.

Source
has_action_plugin?(module_name : String) : Bool

Check if a module has an action plugin

Source
skips_module_dispatch?(module_name : String) : Bool
Source