1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

ANSIBLE_DIST_MODULE_PATH environment variable

This commit is contained in:
Skylar Saveland 2013-09-16 13:43:20 -07:00
parent 4d352e69fc
commit 8dc31f3093

View file

@ -82,9 +82,12 @@ active_user = pwd.getpwuid(os.geteuid())[0]
# Needed so the RPM can call setup.py and have modules land in the
# correct location. See #1277 for discussion
if getattr(sys, "real_prefix", None):
# in a virtualenv
DIST_MODULE_PATH = os.path.join(sys.prefix, 'share/ansible/')
else:
DIST_MODULE_PATH = '/usr/share/ansible/'
# custom ansible location without a virtualenv
DIST_MODULE_PATH = os.environ.get("ANSIBLE_DIST_MODULE_PATH", DIST_MODULE_PATH)
# sections in config file
DEFAULTS='defaults'