mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 13:20:23 -07:00
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.
This commit is contained in:
parent
db43fe6a76
commit
645952c139
4 changed files with 103 additions and 4 deletions
2
test/integration/targets/aws_caller_facts/aliases
Normal file
2
test/integration/targets/aws_caller_facts/aliases
Normal file
|
@ -0,0 +1,2 @@
|
|||
cloud/aws
|
||||
posix/ci/cloud/group4/aws
|
14
test/integration/targets/aws_caller_facts/tasks/main.yaml
Normal file
14
test/integration/targets/aws_caller_facts/tasks/main.yaml
Normal file
|
@ -0,0 +1,14 @@
|
|||
- 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
|
Loading…
Add table
Add a link
Reference in a new issue