Krikri::PauseActionPlugin
Inherits Krikri::ActionPlugin < Reference < Object
pause: (ansible.builtin.pause) as a controller-side action plugin -
ported from plugins/pause.cr. Sleeping here blocks this host's own
execution fiber via Crystal's cooperative scheduler, the same
wall-clock delay a subprocess sleep produced before, but without the
subprocess (or, for a remote host, the SSH round trip) that used to
carry it out. plugins/pause.cr is kept as a real, working binary for
--async/manual invocation.
krikri has no interactive TTY/prompt model, so it never blocks on stdin - which matches real Ansible's own non-interactive behavior (verified against ansible-core 2.14: with closed stdin and no duration, real pause warns "Not waiting for response to prompt as stdin is not interactive" and continues immediately, ok). The prompt text is display-only in real Ansible: the result's stdout is ALWAYS "Paused for X seconds|minutes" computed from the actual elapsed wall-clock time (rounded to 2 decimals, minutes-unit divided by 60), never the requested amount and never the prompt text.
Real 2.14 semantics ported from ansible/plugins/action/pause.py:
- seconds/minutes are
{'type': int}-validated BEFORE anything happens: float values truncate (1.5 -> 1), non-numerics fail the task (failed=True, no wait, no crash). - a computed duration below 1 second is clamped up to 1 (so
minutes: 0still waits ~1 second, and its elapsed-based stdout reads "Paused for 0.02 minutes", not "0.0"). - delta is the integer elapsed seconds; never
changed; runs under check mode (verified, not assumed).
Instance methods
Execute action on controller Returns: modified params to send to remote plugin, or nil if action failed