Hi,
I am in the process of writting a python module for Ansible, and in this I need to import a non-standard shipped python module. How should I solve this? Should I first ensure that I get it installed in the target hosts before the tasks using my module start executing, or is there any ways of having ansible temporarily copy over some modules etc.?
Thanks
Jana
currently you just have to install on targets, we are working on features to allow to ‘bundle’ some imported modules, but this will be limited.
Have you looked into creating an action_plugin (runs on localhost) that uses the non-standard module to do what it needs to do, then calls your module to be run remotely, but not needing the py lib anymore? Depending on what the py lib is doing, this may be an option for you. Check out https://github.com/ansible/ansible/tree/devel/lib/ansible/plugins/action for examples. template or copy might be good examples.