On Sunday, March 5, 2017 at 2:36:08 PM UTC-8, Yuri Kanivetsky wrote:
>
> 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?
>
> 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
  
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

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/31d4990d-6332-4b89-8c1b-8022565d4990%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to