Joined February 2012
·

Nicolai Fröhlich

symfony2tutorials
·
Cologne, GER
·
·

Posted to iterating a hash in an ansible task over 1 year ago

This "solution" is NOT needed anymore since with_dict was introduced in ansible version 1.5 ( Feb 2014 ).

With the variable from your example ...

name: my loop
 action: shell echo ${item.name}
 with_dict: var

... will work perfectly.

See the documentation chapter Looping over Hashes

Achievements
9 Karma
0 Total ProTip Views