[stable-2.9] Mark AWS credentials in ansible-test as sensitive.

This avoids displaying the credentials in CI when retrying tests at maximum verbosity.
(cherry picked from commit b73e7721df)

Co-authored-by: Matt Clay <matt@mystile.com>
This commit is contained in:
Matt Clay 2019-09-16 19:15:04 -07:00 committed by Toshio Kuratomi
parent 7f2ba1aaf8
commit 54ea1353b3

View file

@ -74,6 +74,9 @@ class AwsCloudProvider(CloudProvider):
REGION='us-east-1',
)
display.sensitive.add(values['SECRET_KEY'])
display.sensitive.add(values['SECURITY_TOKEN'])
config = self._populate_config_template(config, values)
self._write_config(config)
@ -100,6 +103,9 @@ class AwsCloudEnvironment(CloudEnvironment):
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:
ansible_vars['aws_cleanup'] = not self.managed