Hi all,
If I want to use the result of a command within a template I use
`register`:
- name: gather some facts
command: ls -l /etc
register: etc_contents
and then, in my template:
# {{ ansible_managed }}
{% for d in etc_contents.stdout_lines %}
{{d}}
{% endfor %}
It works OK, but it would be cleaner to register
`etc_contents.stdout_lines` directly as a variable with list value. Is
there a way to do this?
Ciao