Fix credential env folder, test_tasks.py

This commit is contained in:
Alan Rominger
2021-04-21 09:46:56 -04:00
parent 11c5d577d6
commit 8f9373085a
5 changed files with 24 additions and 19 deletions

View File

@@ -1532,7 +1532,7 @@ class RunJob(BaseTask):
cred_files = private_data_files.get('credentials', {})
for cloud_cred in job.cloud_credentials:
if cloud_cred and cloud_cred.credential_type.namespace == 'openstack':
env['OS_CLIENT_CONFIG_FILE'] = os.path.join('/runner', os.path.basename(cred_files.get(cloud_cred, '')))
env['OS_CLIENT_CONFIG_FILE'] = os.path.join('/runner', 'env', os.path.basename(cred_files.get(cloud_cred, '')))
for network_cred in job.network_credentials:
env['ANSIBLE_NET_USERNAME'] = network_cred.get_input('username', default='')