module

Krikri::ExtraVarsParser

-e / --extra-vars, real Ansible's highest-precedence variable scope. Every accepted form below was checked against a real ansible-core 2.19.4 before being implemented here:

-e key=value one or more whitespace-separated k=v pairs; the value is ALWAYS a string, so -e num=5 yields "5" (type_debug: str), not the integer 5 -e '{"k": 1}' a JSON object - real types preserved, so num stays an int here -e @vars.yml load a YAML (or JSON) file repeated -e later occurrences win on a key collision

Precedence relative to everything else is handled by the executor, which applies the parsed result last - see TaskExecutor's @extra_vars.

Class methods

parse(occurrences : Array(String)) : Hash(String, JSON::Any)

Parses CLI occurrences in order, merging later over earlier.

Source

Nested types