Hi, Again, thank you for your time and concern.
What I intended to do is very simple : I need to write a module similar "ios_command", launched in a very simple playbook : The module (ios_command or my own module) runs on the localhost (thus needs to use my dedicated environment for python /srv/ansible/venv/bin/python), then connects to the target host to do things there. 1. Normal play - the ios_command runs well, my own module is called locally with /usr/bin/python, runs out of the dedicated environment (thus do not find its entry point and abort) 2. Play with ansible_python_interpreter=/srv/ansible/venv/bin/python in inventory for each target host (which is not what I should do, but then) - the ios_command runs well, and my own module also 3. Normal play - my own module includes the "WANT_JSON" tag - the ios_command runs well, and my own module also The tag "# WANT_JSON" mainly breaks the way ansible-play will send the parameters to my own module (but I can handle that), and *as a side effect*, tells module_common.py to treat my own module as it is without trying to ANSIBALLZ it or rewrite the shebang. For the time being, I will use either 3. or 2. .... but I guess there is a better way to handle the problem (since "native" ansible module are working well). This is a "how to write a module, so that it is launched with the correct shebang" issue -- Best regards, Eric -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
