algo/tests/validate-aws-credentials.yml
Dan Zwell ae6bdc916c Read AWS credentials from disk (#14382)
Other programs can read the AWS key and secret from ~/.aws/credentials
(or other configuration file), and with this change Algo can as well.

Optional environment variables: AWS_PROFILE, AWS_SHARED_CREDENTIALS_FILE

The file is not read if the credentials are already set as an Ansible
variable or an environment variable.
2022-04-05 19:03:12 +08:00

7 lines
232 B
YAML

- name: test
hosts: localhost
tasks:
- include_tasks: ../roles/cloud-ec2/tasks/discover-credentials.yml
- assert: { that: "aws_access_key == 'example_key'" }
- assert: { that: "aws_secret_key == 'example_secret'" }