[stable-2.7] Mark ansible-test cloud credentials as sensitive..

(cherry picked from commit 9f7b124a6f)

Co-authored-by: Matt Clay <matt@mystile.com>.
pull/62618/head
Matt Clay 5 years ago committed by Toshio Kuratomi
parent 23c33ccb38
commit 34b1ded2cb

@ -122,6 +122,8 @@ class AzureCloudProvider(CloudProvider):
RESOURCE_GROUP_SECONDARY=response['resourceGroupNames'][1], RESOURCE_GROUP_SECONDARY=response['resourceGroupNames'][1],
) )
display.sensitive.add(values['AZURE_SECRET'])
config = '\n'.join('%s: %s' % (key, values[key]) for key in sorted(values)) config = '\n'.join('%s: %s' % (key, values[key]) for key in sorted(values))
self._write_config(config) self._write_config(config)
@ -142,6 +144,9 @@ class AzureCloudEnvironment(CloudEnvironment):
""" """
config = get_config(self.config_path) config = get_config(self.config_path)
display.sensitive.add(config.get('AZURE_SECRET'))
display.sensitive.add(config.get('AZURE_PASSWORD'))
cmd.append('-e') cmd.append('-e')
cmd.append('resource_prefix=%s' % self.resource_prefix) cmd.append('resource_prefix=%s' % self.resource_prefix)
cmd.append('-e') cmd.append('-e')

@ -199,6 +199,8 @@ class CsCloudProvider(CloudProvider):
SECRET=credentials['secretkey'], SECRET=credentials['secretkey'],
) )
display.sensitive.add(values['SECRET'])
config = self._populate_config_template(config, values) config = self._populate_config_template(config, values)
self._write_config(config) self._write_config(config)

@ -117,6 +117,8 @@ class TowerCloudProvider(CloudProvider):
PASSWORD=connection.password, PASSWORD=connection.password,
) )
display.sensitive.add(values['PASSWORD'])
config = self._populate_config_template(config, values) config = self._populate_config_template(config, values)
self._write_config(config) self._write_config(config)

Loading…
Cancel
Save