# Troubles with the ansible's git module concerning to git submodules

**URL:** <https://forum.ansible.com/t/troubles-with-the-ansibles-git-module-concerning-to-git-submodules/14805>\
**Category:** Ansible Project\
**Created:** [March 19, 2014, 9:19am UTC](https://forum.ansible.com/t/troubles-with-the-ansibles-git-module-concerning-to-git-submodules/14805 "2014-03-19T09:19:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Pinheiro\_Neta](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@Jose\_Pinheiro\_Neta](https://forum.ansible.com/u/Jose_Pinheiro_Neta)\
**Post date:** [March 19, 2014, 9:19am UTC](https://forum.ansible.com/t/troubles-with-the-ansibles-git-module-concerning-to-git-submodules/14805/1 "2014-03-19T09:19:51Z")

</div>

Hi!

In a Roles’ task I’m trying to clone a repo in develop branch. That repo has git submodules.

During the task which use the ansible’s git module, ansible is hanging up.

If I ssh to the box while ansible is hanged up I can verify that the clone as been made.  
Although if I interrupt ansible and ssh to box the clone will be wiped out from there.

Re-running the playbook will result in the same behavior.

The same applies if I clone the repo in the master branch.

Does anyone as already been in this situation?

Cheers,

JPN

---

<div class="post-metadata">

**Author:** ![Balpreet\_Singh](https://avatars.discourse-cdn.com/v4/letter/b/b9e5f3/32.png) [@Balpreet\_Singh](https://forum.ansible.com/u/Balpreet_Singh)\
**Post date:** [April 11, 2014, 12:35pm UTC](https://forum.ansible.com/t/troubles-with-the-ansibles-git-module-concerning-to-git-submodules/14805/2 "2014-04-11T12:35:19Z")

</div>

- name: ensure known hosts  
shell: touch ~/.ssh/known\_hosts

- name: remove [bitbucket.org](http://bitbucket.org) from known host  
shell: ssh-keygen -R [bitbucket.org](http://bitbucket.org)

- name: ensure [bitbucket.org](http://bitbucket.org) in known host  
shell: ssh-keyscan -H [bitbucket.org](http://bitbucket.org) \> ~/.ssh/known\_hosts

repo site may vary

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [April 15, 2014, 9:11pm UTC](https://forum.ansible.com/t/troubles-with-the-ansibles-git-module-concerning-to-git-submodules/14805/3 "2014-04-15T21:11:54Z")

</div>

The git module has an “accept\_hostkey=yes” option that is intended for this purpose, generally speaking. I’m not sure if you were using it or not though.

If you are still seeing issues submodules, it’s most likely you’re running 1.5.X

There are various fixes to submodule handling on 1.6 (devel) – both applied about two weeks ago on the devel branch, so if you are still seeing issues on devel, let us know by filing a ticket.

Thanks!
