Hello fellow admins and programmers,
I was wondering if it’s possible to have the synchronize module modified so compression is optional (like compression=yes/no, etc), rather than hardcoded.
I was working on a playbook to backup all my servers and I found out about the synchronize module, very handy module. So I created a simple task as follows https://gist.github.com/sebdoesntknow/f26a60202a3e9217141b
When I ran the playbook I got the following errors: https://gist.github.com/sebdoesntknow/79e9bd6f400b0c7e9ba0
I tried a few workarounds with rsync and zlib but no avail. So I thought of just disabling compression from rsync and try again, but there’s no such option on ansible as you may know. So I had to edit the module itself which in my system is located at /usr/share/ansible/files/synchronize
Line 246 shows the following:
cmd = ‘%s --delay-updates -FF --compress’ % rsync
Commented that line out and added a copy but excluding the --compress bit
cmd = ‘%s --delay-updates -FF’ % rsync
synchronize works like a charm now.
So I’m not asking to remove the compression option (because it’s actually very useful), I just want to make it optional (i.e not hardcoded into the default rsync command).
Let me know your thoughts about it.
Best Regards,
Seb.