This stackoverflow article explains how to iterate over multiple lines in a 
file with ansible: 
http://stackoverflow.com/questions/33541870/how-do-i-loop-over-each-line-inside-a-file-with-ansible

On Monday, July 4, 2016 at 7:33:15 AM UTC+2, Rakshatha shetty wrote:
>
> - name: Create directory structure
>   hosts: newserver
>   tasks:
>     - name: Directory structure
>       win_file: path="{{ item }}" state=directory
>
>       with_file:
>         - first_example_file
>
> Above is the ansible script I'm using to create directory, path to the new 
> directory is given in the file 'first_example_file'. How should we pass 
> multiple values in the file (i.e. when we have to create multiple 
> directories, what is the format of tje file?)
>
>
>
> On Friday, July 1, 2016 at 10:13:02 PM UTC+5:30, [email protected] wrote:
>>
>> Can you show an example of what you are trying to accomplish?
>>
>> On Friday, July 1, 2016 at 9:44:22 AM UTC-4, Rakshatha shetty wrote:
>>>
>>> Hi,
>>>
>>> I'm using Ansible 2.0.0.2 to create multiple directories by passing path 
>>> to directories in a file and reading the values from file. How can multiple 
>>> values be passed in a single file? Please revert with the format in which 
>>> values (i.e. path to directories) should be passed in the file. 
>>>
>>> Thanks & Regards,
>>> Rakshatha
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/1f16ee31-b0c1-42c8-ab32-68c4a2b823c1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to