Hi,
I would like to use a FOR loop construct to create a multiple directories like this:
{% for dir in temp_dirs %}
- name: {{ dir }} Directory
file: dest={{ repo_dest }}/var/{{ dir }} owner={{ apache_user }} group={{ apache_group }} state=directory recurse=yes
{% endfor %}
my vars file looks like this:
“temp_dirs” : [“bla”, “bla2”]
The syntax above does not comply with YAML :
ERROR: Syntax Error while loading YAML script, <…>
Note: The error may actually appear before this position: <…>
{% for dir in temp_dirs %}
^
Please advise on how to implement this.
Thanks !