ansible/test/integration/targets/aws_caller_facts/tasks/main.yaml
Ed Costello 645952c139 Add aws_caller_facts module and use it in setup-iam.yml (#36683)
* Add aws_caller_facts module and use it in setup-iam.yml

This removes the dependency on having the command line AWS tools
installed.
2018-02-28 16:30:34 +10:00

14 lines
390 B
YAML

- name: retrieve caller facts
aws_caller_facts:
region: "{{ aws_region }}"
aws_access_key: "{{ aws_access_key }}"
aws_secret_key: "{{ aws_secret_key }}"
security_token: "{{security_token}}"
register: result
- name: assert correct keys are returned
assert:
that:
- result.account is not none
- result.arn is not none
- result.user_id is not none