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?
--
Dan Callaghan <dcallagh(a)redhat.com>
Senior Software Engineer, Products & Technologies Operations
Red Hat