class

Krikri::TaskExecutor::LoopLookupError

Inherits Krikri::TaskExecutor::WhenEvaluationError < Exception < Reference < Object

A with_<lookup>: source whose resolved TERM is of the wrong type for the lookup (a with_dict: over a null/scalar). Real fails the task with the lookup plugin's own type refusal ("The lookup plugin 'dict' failed: ... expects a dictionary, got 'None' of type <class 'NoneType'>)"), a BARE registered msg (no "Task failed:" prefix - live-verified vs 2.19.11) and a bodyless [ERROR] block whose Origin is <unknown> plus a fixed "invoke_lookup()" line - the lookup-invocation site never carries source positions. See emit_loop_source_error_block for the block.

Constructors

new(message : String, origin_known : Bool = false)
Source

Instance methods

origin_known?

true when the failing lookup ran INSIDE the loop source's own template (loop: "{{ query('first_found', ...) }}") - ansible-core pins those errors' Origin at the loop keyword's VALUE token (live-verified vs 2.19.11, issue #12). false keeps the with_<lookup>: keyword machinery's bodyless shape - that invocation site carries no source position, so real prints Origin: <unknown> plus the bare invoke_lookup() frame line. See emit_loop_source_error_block for both blocks.

Source