Folgen

I wasn’t able to access a dictionary value in an Ansible Jinja2 template until I realized that I needed to use Python method get on the dictionary variable.
I am still not sure if varname[item]['keyname'] should have worked instead of varname[item].get('keyname', '').
However I now have new abilities in my playbooks. 😎

Melde dich an, um an der Konversation teilzuhaben
Mastodon

Technical and administrative contact for this instance is
Volker Janzen
Lappersdorfer Str. 41
93059 Regensburg
Germany
eMail: webmaster@voja.de