# How to make ansible not zip modules when uploading to remote nodes?

**URL:** <https://forum.ansible.com/t/how-to-make-ansible-not-zip-modules-when-uploading-to-remote-nodes/23887>\
**Category:** Ansible Project\
**Created:** [March 5, 2017, 1:45pm UTC](https://forum.ansible.com/t/how-to-make-ansible-not-zip-modules-when-uploading-to-remote-nodes/23887 "2017-03-05T13:45:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yuri\_Kanivetsky](https://avatars.discourse-cdn.com/v4/letter/y/b3f665/32.png) [@Yuri\_Kanivetsky](https://forum.ansible.com/u/Yuri_Kanivetsky)\
**Post date:** [March 5, 2017, 1:45pm UTC](https://forum.ansible.com/t/how-to-make-ansible-not-zip-modules-when-uploading-to-remote-nodes/23887/1 "2017-03-05T13:45:44Z")

</div>

Hi,

When running ansible with ANSIBLE\_KEEP\_REMOTE\_FILES=1, e.g.

ANSIBLE\_KEEP\_REMOTE\_FILES=1 ansible-playbook -i c2, playbook.yml -vv -u root -k

and then looking at the uploaded files (~/.ansible/tmp/…), I see no module code in them, but I see statements like this:

ZIPDATA = “”“UEsDBBQA…AACmiQAAAAA=”“”

So most likely module code is zipped. Can I disable zipping?

Regards,  
Yuri

---

<div class="post-metadata">

**Author:** ![Toshio\_Kuratomi](https://avatars.discourse-cdn.com/v4/letter/t/41988e/32.png) [@Toshio\_Kuratomi](https://forum.ansible.com/u/Toshio_Kuratomi)\
**Post date:** [March 6, 2017, 7:58pm UTC](https://forum.ansible.com/t/how-to-make-ansible-not-zip-modules-when-uploading-to-remote-nodes/23887/2 "2017-03-06T19:58:01Z")

</div>

no, you can’t. the payload that we’re shipping consists of both the module file and supporting code from ansible/module\_utils. We need a way to ship all of these and putting them into a zip file seems to be the best way (someday we may be able to get python on the remote machine to execute the zip file natively. Right now we have to use a wrapper script because python-2.4, 2.6, 2.7, and 3.x all have different behaviours when trying to execute a zip file containing python code.

Most often when people use ANSIBLE\_KEEP\_REMOTE\_FILES, they’re trying to debug the module code that’s executed on the remote machine. This section of the documentation: [http://docs.ansible.com/ansible/dev\_guide/developing\_modules\_best\_practices.html#debugging-ansiblemodule-based-modules](http://docs.ansible.com/ansible/dev_guide/developing_modules_best_practices.html#debugging-ansiblemodule-based-modules) should have everything you need to turn the single file into a tree of code that you can debug on the remote machine.

Hope that helps!  
-Toshio
