For anyone still having this issue, I fixed it by listing the repo in HTTP 
format rather than SSH - http://mysite.com/mygitrepo.git instead of 
[email protected]:mygitrepo.git

On Saturday, November 17, 2012 3:42:53 PM UTC-8, nflacco wrote:
>
> I'm having trouble with the git module. It works via ansible but not 
> ansible playbook. The arguments are exactly the same. I can ssh into the 
> server and do a git clone from the command line in the target folder as 
> well. Does ansible-playbook require different params for the git module?
>
> *Ansible*
>
> $ansible prod --user=ec2-user --private-key=key.pem -m git -a 
>> '[email protected]:nflacco/myrepo.git dest=/srv/checkout/myrepo'
>> www.myserver.com | success >> {
>>     "after": "3c50d2b", 
>>     "before": null, 
>>     "changed": true
>> }
>
>
> *Ansible-playbook (playbook file)*
>
> ---
> - hosts: prod
>   sudo: True
>   vars:
>     node_version: "0.6.13"
>   tasks:
>   - name: Install Git
>     action: yum pkg=git state=latest
>   - name: Get myrepo
>     action: git [email protected]:nflacco/myrepo.git 
> dest=/srv/checkout/myrepo
>
> Here is the command line output (with verbose), after I manually stop it 
> because it hangs ad infinium:
>
> TASK: [Install Git] ********************* 
>> ok: [www.myserver.com] => {"changed": false, "msg": "", "rc": 0, 
>> "results": ["All packages providing git are up to date"]}
>> TASK: [Get myrepo] ********************* 
>> ^C32
>> ERROR: interupted
>
>
> When I use more than the stub playbook above (copy git ssh keys and bunch 
> of other stuff), ansible-playbook creates an empty folder (with .git 
> subfolder) and hangs.
>  
>

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

Reply via email to