Re: [ansible-project] For Loop Construct in YAML Tasks File to Create Multiple Directories

2013-11-26 Thread Patrick Regan
You could try this: - name: Add Directories file: dest={{ repo_dest }}/var/{{ item }} owner={{ apache_user }} group={{ apache_group }} state=directory recurse=yes with_items: temp_dirs The with_times will take the contents of your variable temp_dirs and one at a time substitute them for the

[ansible-project] For Loop Construct in YAML Tasks File to Create Multiple Directories

2013-11-26 Thread Michael Leikind
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