mirror of
https://github.com/ansible/awx.git
synced 2026-05-08 18:07:36 -02:30
Honor CLOUD_VERIFY_SSL variable in rax import
This commit is contained in:
@@ -820,7 +820,7 @@ class RunJob(BaseTask):
|
|||||||
elif cloud_cred and cloud_cred.kind == 'rax':
|
elif cloud_cred and cloud_cred.kind == 'rax':
|
||||||
env['RAX_USERNAME'] = cloud_cred.username
|
env['RAX_USERNAME'] = cloud_cred.username
|
||||||
env['RAX_API_KEY'] = decrypt_field(cloud_cred, 'password')
|
env['RAX_API_KEY'] = decrypt_field(cloud_cred, 'password')
|
||||||
env['CLOUD_VERIFY_SSL'] = str(True)
|
env['CLOUD_VERIFY_SSL'] = str(False)
|
||||||
elif cloud_cred and cloud_cred.kind == 'gce':
|
elif cloud_cred and cloud_cred.kind == 'gce':
|
||||||
env['GCE_EMAIL'] = cloud_cred.username
|
env['GCE_EMAIL'] = cloud_cred.username
|
||||||
env['GCE_PROJECT'] = cloud_cred.project
|
env['GCE_PROJECT'] = cloud_cred.project
|
||||||
|
|||||||
@@ -385,6 +385,10 @@ def parse_args():
|
|||||||
def setup():
|
def setup():
|
||||||
default_creds_file = os.path.expanduser('~/.rackspace_cloud_credentials')
|
default_creds_file = os.path.expanduser('~/.rackspace_cloud_credentials')
|
||||||
|
|
||||||
|
# pyrax does not honor the environment variable CLOUD_VERIFY_SSL=False, so let's help pyrax
|
||||||
|
if 'CLOUD_VERIFY_SSL' in os.environ:
|
||||||
|
pyrax.set_setting('verify_ssl', os.environ['CLOUD_VERIFY_SSL'])
|
||||||
|
|
||||||
env = get_config(p, 'rax', 'environment', 'RAX_ENV', None)
|
env = get_config(p, 'rax', 'environment', 'RAX_ENV', None)
|
||||||
if env:
|
if env:
|
||||||
pyrax.set_environment(env)
|
pyrax.set_environment(env)
|
||||||
|
|||||||
Reference in New Issue
Block a user