synchronize
reports changed_when
when excluded file has changed
#542
Labels
synchronize
Issue and PR for synchronize module
SUMMARY
changed_when
seems not to respect excluded files viarsync_opts
. If the given file was changed, despite not being synchronized when running the playbook,synchronize
will result inchanged_when = True
.ISSUE TYPE
COMPONENT NAME
ansible.posix.synchronize
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
macOS -> Debian
STEPS TO REPRODUCE
Have a project that contains a
playbook.yml
and a few other files. Now in your playbook define a task to synchronize the project onto a server in production:This will synchronize all files, but the playbook.yml. It works. On continues calls
changed_when = False
. But now change something in theplaybook.yml
and re-run it.EXPECTED RESULTS
It should
changed_when = False
regardless of me changing the file or not.Verbose output:
ACTUAL RESULTS
It will now result in
changed_when = True
, although theplaybook.yml
itself is skipped by--exclude
.ADDITIONAL INFORMATION
My local ansible.cfg:
Please note I call
setup
in my playbook above the task, so facts are gathered regardless of me specifyingexplicit
.The text was updated successfully, but these errors were encountered: