GIT module bug?

145 views
Skip to first unread message

ProfHase

unread,
Jul 10, 2014, 10:49:24 AM7/10/14
to ansible...@googlegroups.com
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

Dick Davies

unread,
Jul 10, 2014, 1:20:43 PM7/10/14
to ansible list
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.
> --
> 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 ansible-proje...@googlegroups.com.
> To post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/085b4fac-b32c-4153-b274-f7b98579d02d%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Michael DeHaan

unread,
Jul 11, 2014, 6:28:02 PM7/11/14
to ansible...@googlegroups.com
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.



Dick Davies

unread,
Jul 12, 2014, 8:18:49 AM7/12/14
to ansible list
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).
> https://groups.google.com/d/msgid/ansible-project/CA%2BnsWgy0PSxvderTtjvT6T8%3D1wfDX7ZFkZ6eu7xx%3DtSqb8b2fg%40mail.gmail.com.

Michael DeHaan

unread,
Jul 12, 2014, 8:53:45 AM7/12/14
to ansible...@googlegroups.com
Returns changed:  True.

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

Thanks!


Reply all
Reply to author
Forward
0 new messages