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?
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?
My workaround procedure is [1]:
1) copy with force=no
2) fetch
3) compare files locally via shell (sha1sum)
4) fail if fingerprints do not match