Merge pull request #542 from jangsutsr/fix-7737

[3.2.2]support `AZURE_CLOUD_ENVIRONMENT`
This commit is contained in:
Aaron Tan
2017-10-26 10:20:14 -04:00
committed by GitHub
4 changed files with 37 additions and 0 deletions

View File

@@ -1890,6 +1890,9 @@ class RunInventoryUpdate(BaseTask):
env['AZURE_AD_USER'] = passwords.get('source_username', '')
env['AZURE_PASSWORD'] = passwords.get('source_password', '')
env['AZURE_INI_PATH'] = cloud_credential
if inventory_update.credential and \
inventory_update.credential.inputs.get('cloud_environment', None):
env['AZURE_CLOUD_ENVIRONMENT'] = inventory_update.credential.inputs['cloud_environment']
elif inventory_update.source == 'gce':
env['GCE_EMAIL'] = passwords.get('source_username', '')
env['GCE_PROJECT'] = passwords.get('source_project', '')