# synchronize module update request

**URL:** <https://forum.ansible.com/t/synchronize-module-update-request/15626>\
**Category:** Ansible Project\
**Created:** [July 9, 2014, 12:06am UTC](https://forum.ansible.com/t/synchronize-module-update-request/15626 "2014-07-09T00:06:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Seba\_Grillo](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@Seba\_Grillo](https://forum.ansible.com/u/Seba_Grillo)\
**Post date:** [July 9, 2014, 12:06am UTC](https://forum.ansible.com/t/synchronize-module-update-request/15626/1 "2014-07-09T00:06:01Z")

</div>

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](https://gist.github.com/sebdoesntknow/f26a60202a3e9217141b)

When I ran the playbook I got the following errors: [https://gist.github.com/sebdoesntknow/79e9bd6f400b0c7e9ba0](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.

---

<div class="post-metadata">

**Author:** ![Timothy\_Appnel](https://avatars.discourse-cdn.com/v4/letter/t/e5b9ba/32.png) [@Timothy\_Appnel](https://forum.ansible.com/u/Timothy_Appnel)\
**Post date:** [July 10, 2014, 5:01pm UTC](https://forum.ansible.com/t/synchronize-module-update-request/15626/2 "2014-07-10T17:01:10Z")

</div>

Sounds about right to me. I don't recall forcing the compress option when I initially wrote that module and submitted it to core. Maybe I did. Not sure why now tho.

Regardless. Have you created a PR for this yet? My only suggestion is that compression is on by default but a user can disable it by default with a --no-compress flag. The behavior everyone is accustomed to continues as it's been but users like yourself have the means to turn that off.

\<tim/\>

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [July 11, 2014, 10:27pm UTC](https://forum.ansible.com/t/synchronize-module-update-request/15626/3 "2014-07-11T22:27:07Z")

</div>

Yep, existing behavior as the default and a compress=no option would be welcome.
