BuildTheNet

Opening your workspace

Your learning content and tools are loading.

Learning paths › Automation › Parsing output and knowing which variable wins

Parsing output and knowing which variable wins

Two things a playbook stops working without. First, human-readable output turned into named fields — with Genie, a community template library, or a TextFSM template of your own. Second, knowing which definition of a variable wins: gathered facts, Ansible's own runtime variables, another host's variables, a play's declared inputs, a file loaded mid-run and a registered task result, with when each is evaluated made explicit — closing on the filters that reshape the result, including a fallback for an undefined value, a mapping overlaid on a base, an attribute projected out of every record, JMESPath and the IP address filters. Explanation and checks; two written exercises.

Lessons

More in Automation