I am a Network Engineer and Ansible is relative new for me.
At the moment I am trying to build a template with “JSON” as source. See below.
The template should do the follwing (hopefully you get the idea).
I am struggling, how can i get the items in the list “INT_LIST” ?
Can someone point my to a good sample or documentation.
I am a Network Engineer and Ansible is relative new for me.
At the moment I am trying to build a template with "JSON" as source. See below.
The template should do the follwing (hopefully you get the idea).
I am struggling, how can i get the items in the list "INT_LIST" ?
Can someone point my to a good sample or documentation.
TIA
Juergen
Hello Juergen,
this should do the trick:
{% for item in host.INT_LIST %}
I suggest to pick a different loop variable name as "item" is the standard one
in Jinja.