Variables

Playbook vars, gatherer results and CLI overrides — scope, lazy evaluation, and the shadowing pitfall.

A playbook's vars block holds free-form name = expr bindings. Expressions may reference gatherer results and other vars. Conditions and properties evaluate lazily at run time against the full scope; gather params evaluate before variables resolve. The full precedence and override rules are in Variable precedence.

Shadowing pitfall

Property/params block fields shadow outer variables: url = url inside a properties block is a self-reference cycle error. Use distinct names (tool_url = ... then url = tool_url).