So, I found the problem. Actually, I'm not sure if it's a problem or desired behaviour :)
When I run 'source hacking/env-setup', the PYTHONPATH environmental variable gets set to the 'lib' directory in the ansible repository used for development. This directory however does not contain the external Python dependencies (installed with pip) which are installed in /usr/lib/python2.7/site-packages. If a PYTHONPATH environmental variable is defined before running 'source hacking/env-setup' however, this original path is prepended to the new PYTHONPATH. So, I'm now simply exporting PYTHONPATH=/usr/lib/python2.7/site-packages before I run env-setup and all is well. I can now use test-module to test modules that rely on external dependencies. Hopefully this is useful to somebody in a similar situation. Feel free to let me know if I'm overlooking something and made this more difficult than necessary. Regards, Simon -- 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/34446686-f039-4920-8343-f2360b2bd6e7%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
