I'm using it to set up OpenWRT. In attempting to use the synchronize module, I got the following error:
failed: [owrt -> 127.0.0.1] => {"cmd": "rsync --delay-updates -F --compress --archive --rsh 'ssh -S none -o StrictHostKeyChecking=no' --out-format='<<CHANGED>>%i %n%L' \"/tmp/owrt_git_repo/\" \"root@owrt:/root/bin\"", "failed": true, "rc": 12} msg: rsync: This rsync lacks old-style --compress due to its external zlib. Try -zz. rsync error: syntax or usage error (code 1) at main.c(1554) [server=3.1.1] rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: error in rsync protocol data stream (code 12) at io.c(226) [sender=3.1.1]
So I searched synchronize.py and replaced the only occurrence of
"--compress" with "-zz". And it worked. I note that on github,
ansible-modules-core/files/synchronize.py still includes "--compress".
This message was passed along to @abadger who says:
So I just looked at the man page and it looks like -zz wasn't implemented until 3.1.1 (there's some room for interpretation of whether the option might be accepted earlier but not do anything, we'd have to check if we want to go further into this.) Since rhel6 is on a 3.0 version of rsync, I don't think we can just replace it. Maybe we can detect the error and try the alternation cli argument?
Workaround: Turn off the compress feature in the synchronize module with compress=no and pass -zz using the rsync_opts.
The text was updated successfully, but these errors were encountered:
In a private email Giles Orr reports:
This message was passed along to @abadger who says:
Workaround: Turn off the compress feature in the synchronize module with
compress=noand pass-zzusing thersync_opts.The text was updated successfully, but these errors were encountered: