mirror of
https://github.com/ansible/awx.git
synced 2026-03-18 01:17:35 -02:30
Add additional controller directory for collections for inventory update
This commit is contained in:
@@ -2391,6 +2391,12 @@ class RunInventoryUpdate(BaseTask):
|
|||||||
paths = [config_values[config_setting]] + paths
|
paths = [config_values[config_setting]] + paths
|
||||||
paths = [os.path.join(CONTAINER_ROOT, folder)] + paths
|
paths = [os.path.join(CONTAINER_ROOT, folder)] + paths
|
||||||
env[env_key] = os.pathsep.join(paths)
|
env[env_key] = os.pathsep.join(paths)
|
||||||
|
if 'ANSIBLE_COLLECTIONS_PATHS' in env:
|
||||||
|
paths = env['ANSIBLE_COLLECTIONS_PATHS'].split(':')
|
||||||
|
else:
|
||||||
|
paths = ['~/.ansible/collections', '/usr/share/ansible/collections']
|
||||||
|
paths.append('/usr/share/automation-controller/collections')
|
||||||
|
env['ANSIBLE_COLLECTIONS_PATHS'] = os.pathsep.join(paths)
|
||||||
|
|
||||||
return env
|
return env
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user