If I start with a yaml object provided by test-kitchen like this;
I might need to process the subkeys of that in some way. But unfortunately the
set_fact module is pretty simple, and expects to receive a single variable as
output. You can’t for example do this;
as the subkey cannot be complex. So you have to take advantage of jinjas methods
for aggregating
The new combine filter makes it possible to build up hashes using set_fact. Note the use of default({}) to address the possibility that x is not defined.
Thanks to the union filter, you can do the same with lists. Combining these techniques makes it possible to build up complex data structures dynamically.