Of course, thanks!

On Wednesday, December 11, 2013 11:13:06 AM UTC-5, Scott Sturdivant wrote:
>
> It's iterating over your list of items correctly, but by indexing to [0], 
> it's taking the first char of the item, which happens to be '/'.  Remove 
> the [0] and you should be fine.
>
>
> On Wed, Dec 11, 2013 at 9:10 AM, Michael Baydoun 
> <[email protected]<javascript:>
> > wrote:
>
>> I expected the following to init a git repository in /home/youruser/a, 
>> but instead it's created created in /
>>
>> what am I doing wrong?
>>
>> ---
>>
>> - hosts: yourhost
>>
>>   user: root
>>
>>   gather_facts: no
>>
>>   tasks:
>>
>>     - shell: /usr/bin/git init chdir={{ item[0] }}
>>
>>       with_items:
>>
>>         - [ '/home/youruser/a', '/home/youruser/b', '/home/youruser/c', 
>> '/home/youruser/d' ]
>>
>> -- 
>> 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] <javascript:>.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>

-- 
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].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to