Mark AWS credentials in ansible-test as sensitive.

This avoids displaying the credentials in CI when retrying tests at maximum verbosity.
This commit is contained in:
Matt Clay 2019-09-16 19:15:04 -07:00
parent 6d8743d5f1
commit b73e7721df

View file

@ -74,6 +74,9 @@ class AwsCloudProvider(CloudProvider):
REGION='us-east-1', REGION='us-east-1',
) )
display.sensitive.add(values['SECRET_KEY'])
display.sensitive.add(values['SECURITY_TOKEN'])
config = self._populate_config_template(config, values) config = self._populate_config_template(config, values)
self._write_config(config) self._write_config(config)
@ -100,6 +103,9 @@ class AwsCloudEnvironment(CloudEnvironment):
ansible_vars.update(dict(parser.items('default'))) ansible_vars.update(dict(parser.items('default')))
display.sensitive.add(ansible_vars.get('aws_secret_key'))
display.sensitive.add(ansible_vars.get('security_token'))
if 'aws_cleanup' not in ansible_vars: if 'aws_cleanup' not in ansible_vars:
ansible_vars['aws_cleanup'] = not self.managed ansible_vars['aws_cleanup'] = not self.managed