I am trying to render a template. I have to create a list as
host:
- '111.222.333.444'
- '555.666.777.888'
which has to be taken from another host file.
I am using something like this:
{% for host in groups['hostgroup'] %}
host: {{ host }}
{% endfor %}
What is the correct way to achieve the result?