Krikri::AssertActionPlugin
Inherits Krikri::ActionPlugin < Reference < Object
assert: (ansible.builtin.assert) as a controller-side action plugin -
ported verbatim from plugins/assert.cr. that: conditions only ever
reference variables already resolved into @vars, exactly like
when:/changed_when: - there's no filesystem/network access or
controller-vs-target distinction to make, so this closes the gap
plugins/assert.cr's own comment already flagged ("Implemented as a
plain module rather than the control-node-only action plugin real
Ansible uses ... there's nothing an action plugin buys here" - true
for correctness, but a real remote SSH round trip + upload for every
assert: task was a real, avoidable cost). plugins/assert.cr is kept
as a real, working binary for --async/manual invocation.
quiet: (bool, default false) is display-only: a passing assert
with quiet: true still carries msg in its result/registered var
(live-verified against real ansible-core 2.19.4), but the success
message is not printed. Real Ansible implements the same thing by
adding _ansible_verbose_always when NOT quiet; here a quiet
success instead tags the result with _ansible_quiet: true (private
_ansible_* keys are stripped before register, so the registered
var shape matches real Ansible's exactly either way) and
ResultDisplay suppresses the msg for it. Failures report
msg/assertion/evaluated_to identically with or without quiet:.
Instance methods
Execute action on controller Returns: modified params to send to remote plugin, or nil if action failed