# git pull not supported by ansible git module?

**URL:** <https://forum.ansible.com/t/git-pull-not-supported-by-ansible-git-module/18402>\
**Category:** Ansible Project\
**Created:** [June 4, 2015, 10:37am UTC](https://forum.ansible.com/t/git-pull-not-supported-by-ansible-git-module/18402 "2015-06-04T10:37:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![namrata.deka](https://avatars.discourse-cdn.com/v4/letter/n/848f3c/32.png) [@namrata.deka](https://forum.ansible.com/u/namrata.deka)\
**Post date:** [June 4, 2015, 10:37am UTC](https://forum.ansible.com/t/git-pull-not-supported-by-ansible-git-module/18402/1 "2015-06-04T10:37:02Z")

</div>

I have a private git repo and I want it cloned onto my remote servers in the first execution of my playbook. Thereafter I want my repo to be pulled, not cloned over and over again for any change i make in the repository. What is the way to do that?  
Right now my repo is cloned on every run of my playbook. Not very efficient.

---

<div class="post-metadata">

**Author:** ![Brian\_Coca](https://avatars.discourse-cdn.com/v4/letter/b/6de8d8/32.png) [@Brian\_Coca](https://forum.ansible.com/u/Brian_Coca)\
**Post date:** [June 5, 2015, 2:03pm UTC](https://forum.ansible.com/t/git-pull-not-supported-by-ansible-git-module/18402/2 "2015-06-05T14:03:58Z")

</div>

i think you are looking for the clone=no option.

from ansible-doc git:

- clone  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;If `no', do not clone the repository if it does not exist  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;locally (Choices: yes, no) [Default: yes]

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [June 5, 2015, 2:20pm UTC](https://forum.ansible.com/t/git-pull-not-supported-by-ansible-git-module/18402/3 "2015-06-05T14:20:28Z")

</div>

Are you using the git module or an ad hoc shell command? The git module should do what you want with something like this:

- git:  
repo: “ssh://[git@github.com/mylogin/hello.git](http://git@github.com/mylogin/hello.git)”  
dest: /home/mylogin/hello

If it’s cloning every time, some more information about how you are able to diagnose that it is cloning would be helpful.

-Toshio
