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:
parent
4d352e69fc
commit
8dc31f3093
1 changed files with 3 additions and 0 deletions
|
@ -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'
|
||||
|
|
Loading…
Reference in a new issue