mirror of
https://github.com/ansible/awx.git
synced 2026-05-20 07:17:40 -02:30
Fix to enable system paths along with requirements override, from @alancoding.
This commit is contained in:
@@ -1465,12 +1465,14 @@ class RunJob(BaseTask):
|
|||||||
if authorize:
|
if authorize:
|
||||||
env['ANSIBLE_NET_AUTH_PASS'] = network_cred.get_input('authorize_password', default='')
|
env['ANSIBLE_NET_AUTH_PASS'] = network_cred.get_input('authorize_password', default='')
|
||||||
|
|
||||||
for env_key, folder in (
|
for env_key, folder, default in (
|
||||||
('ANSIBLE_COLLECTIONS_PATHS', 'requirements_collections'),
|
('ANSIBLE_COLLECTIONS_PATHS', 'requirements_collections', '~/.ansible/collections:/usr/share/ansible/collections'),
|
||||||
('ANSIBLE_ROLES_PATH', 'requirements_roles')):
|
('ANSIBLE_ROLES_PATH', 'requirements_roles', '~/.ansible/roles:/usr/share/ansible/roles:/etc/ansible/roles')):
|
||||||
paths = []
|
paths = default.split(':')
|
||||||
if env_key in env:
|
if env_key in env:
|
||||||
paths.append(env[env_key])
|
for path in env[env_key].split(':'):
|
||||||
|
if path not in paths:
|
||||||
|
paths.append(env[env_key])
|
||||||
paths.append(os.path.join(private_data_dir, folder))
|
paths.append(os.path.join(private_data_dir, folder))
|
||||||
env[env_key] = os.pathsep.join(paths)
|
env[env_key] = os.pathsep.join(paths)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user