On Mon, 04 Jul 2016 10:24:39 +1000
Dan Callaghan <dcallagh(a)redhat.com> wrote:
Excerpts from Will Thames's message of 2016-07-04 00:10 +00:00:
> > In my continuing quest to get our daily ansible check/diff report
> > to be
> > 0 and all playbooks to be idempotent I have run into a case I
> > would like to ask everyone about. :)
> >
> > The ansible git module is in use in a number of playbooks/roles
> > now. By default (or if you specify update=yes) it will do a git
> > pull to pull the latest changes, so it's not idempotent (ie, when
> > running --check it always shows such tasks as changed because it
> > cannot know if there's going to be new data or not)
>
> That's not my reading of the git module (it checks to see if remote
> head is the same as current head before fetching - changed should
> be False, even in check mode, if there are no new commits. I
> haven't tested if this is actually the behaviour, but if not, it
> sounds like that's a bug in the git module).
There is indeed a bug which causes git repos with submodules to
always report changed (we hit this in our own environment):
https://github.com/ansible/ansible-modules-core/issues/1509
Could that be what's causing the false change reports in Fedora's
check-diff report?
Well, I think it's just that the repos have new commits and update is
yes... but I can take a closer look and see if there's submodules
involved. ;)
Thanks for the pointer.
kevin