class

Krikri::FailActionPlugin

Inherits Krikri::ActionPlugin < Reference < Object

fail: (ansible.builtin.fail) as a controller-side action plugin - ported verbatim from plugins/fail.cr. Unconditionally fails; its own when: (evaluated before any action/module ever runs) is what makes real playbooks use it conditionally. plugins/fail.cr is kept as a real, working binary for --async/manual invocation.

msg carries the task arg's NATIVE type: Ansible's action assigns result['msg'] = self._task.args.get('msg') verbatim (no str() anywhere), so a non-string YAML literal stays an int/float/bool/ None/list/dict in the wire result, the fatal dump AND the registered variable (live-verified vs 2.19.11: msg: 50 → {"msg": 50}, block "Action failed: 50"; msg: with no value is args.get's explicit None → {"msg": null}, block "Action failed: None" - NOT the default message, which only applies when the msg key is absent entirely; an empty string is kept as {"msg": ""}). execute_action opts fail out of the marker strip so the marked literal reaches this plugin intact.

Instance methods

execute

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

Source