Krikri::InvalidRegisterError
Raised at PARSE time when a task's register: value is not a legal
variable-name identifier. ansible-playbook validates the RAW
string (it never templates the value - register: '{{ x }}' is
rejected as-is, whatever x resolves to) at task-load time and
refuses the whole run: "Invalid 'register' specified: Invalid
variable name '<value>'." plus "Variable names must be strings
starting with a letter or underscore character, and contain only
letters, numbers and underscores." (rc=4, no PLAY RECAP - verified
against ansible-core 2.19.11 with a minimal repro for
'{{sources_register}}', '123bad', 'foo bar' and ''). webbylab.
sources' own register: '{{sources_register}}' with the empty
default (round 900914) previously sailed through parsing and
failed later with a confusing runtime error. Bypasses parse_tasks's
generic per-task rescue (same mechanism as StaticImportUndefinedError)
so it propagates to the top-level parse-error handler like
Ansible's own hard stop.
Constructors
Instance methods
The rendered [ERROR] + Origin block for the task-load refusal whose source position is known (built at the raise site, where the source map lives) - ansible-core prints the Origin of the register VALUE itself (the opening quote) with a caused-by chain, so the byte-for-byte match needs it (probed live vs 2.19.11). nil renders message-only, as the source-less raise sites always did.