dominis/ansible-shell — pull request #10 by aboyett (2013-07-16 21:17:41+00:00)
Title: fix module inclusion path when running from source

This is an old patch I've had in a local branch but had not submitted.
I've rebased it to effectively undo Lorin Hochstein's commit cc47d4c. While
that commit also worked I think this version is more correct as it
ensures that ansible-shell module path behavior mirrors that of ansible
itself. ansible uses DEFAULT_MODULE_PATH, not DIST_MODULE_PATH to set
module_path if -M is not used, as shown on line 474 in
lib/ansible/utils/__init__.py

The previous search paths assumed that ansible was installed on the
system. This meant that it did not work if running ansible from a
source checkout without installing it via pip (or other means.) More
insidiously, if a user was running from a source checkout, but also
installed ansible in system paths, ansible-shell used the system
version of ansible modules, not the source version.