Working , 
Thank you !!!! 


On Tuesday, August 29, 2017 at 12:50:34 AM UTC+3, Matt Martz wrote:
>
> The `with_items` on your `git` task is indented 2 spaces too far.  Make 
> sure the indentation of `with_items` matches the name of the module you are 
> attempting to use.
>
> On Mon, Aug 28, 2017 at 4:38 PM, Shahar L <[email protected] <javascript:>> 
> wrote:
>
>> Hello,
>> I'm trying to add my playbook step to clone from git repo and put the 
>> source repo's and dest folder under group_vars.
>>
>>
>> group_vars:
>> repos:
>>     - { src: "[email protected]:USER/REPO-Y.git", dest: "/opt/REPO_YYY/" }
>>
>>
>> Playbook:
>> - name: Display all repos
>>   debug:
>>     var: item
>>   with_items: "{{ repos }}"
>>
>> - name: gitclone
>>   git:
>>     repo: '{{ item.src }}'
>>     dest: '{{ item.dest }}'
>>     accept_hostkey: yes
>>     version: '{{gitrepo}}'
>>     key_file: ~/.keys
>>     force: yes
>>     with_items: "{{ repos }}"
>>
>>
>> Final output:
>>
>> ok: [XXXXX] => (item={u'dest': u'/opt/REPO-YYY', u'src': 
>> u'[email protected]:USER/REPO-Y.git'}) => {
>>     "item": {
>>         "dest": "/opt/REPO-YYY",
>>         "src": "[email protected]:USER/REPO-Y.git"
>>     }
>> }
>>
>> TASK [ROLE: gitclone] 
>> ********************************************************
>> fatal: [XXXX]: FAILED! => {"failed": true, "msg": "ERROR! 'item' is 
>> undefined"}
>> fatal: [XXXX]: FAILED! => {"failed": true, "msg": "ERROR! 'item' is 
>> undefined"}
>>
>>
>> Someone can assist ? there is something that i'm missing here... 
>>
>> Thanks,
>> Shahar
>>
>> -- 
>> 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:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/ansible-project/1e361272-25de-4c54-93a5-e23dc6c1b987%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/ansible-project/1e361272-25de-4c54-93a5-e23dc6c1b987%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
> Matt Martz
> @sivel
> sivel.net
>

-- 
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/c489c88e-03cb-4fe7-a136-1c0f5528e6f9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to