# GIT module bug?

**URL:** <https://forum.ansible.com/t/git-module-bug/15644>\
**Category:** Ansible Project\
**Created:** [July 10, 2014, 2:49pm UTC](https://forum.ansible.com/t/git-module-bug/15644 "2014-07-10T14:49:24Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![profhase85](https://avatars.discourse-cdn.com/v4/letter/p/2bfe46/32.png) [@profhase85](https://forum.ansible.com/u/profhase85)\
**Post date:** [July 10, 2014, 2:49pm UTC](https://forum.ansible.com/t/git-module-bug/15644/1 "2014-07-10T14:49:24Z")

</div>

Not sure whether I am doing something wrong. Using the following playbook

- hosts: myhosts  
tasks:
- name: Update git repo der Anwendung  
git:  
dest=/my/webapp  
repo=repo@host:repos/my-webapp  
recursive=no  
update=yes  
accept\_hostkey=yes  
sudo: yes

The git to pull the changes the git module always says there is a change:

changed: [myhost] =\> {“after”: “61b54a57dca2bb263a795541fd3cd9a8090aac45”, “before”: “61b54a57dca2bb263a795541fd3cd9a8090aac45”, “changed”: true, “msg”: “Local modifications exist”}

while I am quite sure that no local changes exist. Can someone reproduce it?

Thanks

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [July 10, 2014, 5:20pm UTC](https://forum.ansible.com/t/git-module-bug/15644/2 "2014-07-10T17:20:40Z")

</div>

Yeah i see the same thing. if you set it to a specific commit or  
release it won't trigger,  
without that it seems like it always 'git pull's to ensure you have an  
up to date copy.

---

<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:** [July 11, 2014, 10:27pm UTC](https://forum.ansible.com/t/git-module-bug/15644/3 "2014-07-11T22:27:58Z")

</div>

Can’t say I parse the “won’t trigger” part.

I believe a bug was filed for it returning changed=true in some cases where there was not a change.

---

<div class="post-metadata">

**Author:** ![Dick\_Davies](https://avatars.discourse-cdn.com/v4/letter/d/b9e5f3/32.png) [@Dick\_Davies](https://forum.ansible.com/u/Dick_Davies)\
**Post date:** [July 12, 2014, 12:18pm UTC](https://forum.ansible.com/t/git-module-bug/15644/4 "2014-07-12T12:18:43Z")

</div>

Sorry, "trigger" in this case means notify: clauses always fire if  
you're doing a git pull  
without a specific commit/tag (in my experience at least).

---

<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:** [July 12, 2014, 12:53pm UTC](https://forum.ansible.com/t/git-module-bug/15644/5 "2014-07-12T12:53:42Z")

</div>

Returns changed: True.

yes, this is probably true, I believe the existing ticket already tracks this.

Thanks!
