Hi,

is there an (easy) way to make the copy module [1] fail if the remote
file exists and is different from the source file?
The goal is to
- not override the destination (force=no) and
- abort if the file exists and is different from the source.

The fetch module [2] has a 'fail_on_missing' parameter. I would need a
fail_on_remotefileexists_but_different ;)
Currently one is left with
- backup=yes
or
- force=no
but both parameter won't help for the specific use-case.

Anyone else had this use-case yet and made a workaround?

thanks,
nusenu


[1] https://docs.ansible.com/ansible/copy_module.html
[2] https://docs.ansible.com/ansible/fetch_module.html

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/56589FF2.3060304%40openmailbox.org.
For more options, visit https://groups.google.com/d/optout.

Reply via email to