Debian Codegraph @

ansible_collections/amazon/aws/tests/integration/targets/callback_aws_resource_actions/main.yml

raw
1 ---
2 - name: Run simple test with AWS Resource Actions callback enabled
3 hosts: localhost
4 gather_facts: false
5 module_defaults:
6 group/aws:
7 access_key: "{{ aws_access_key }}"
8 secret_key: "{{ aws_secret_key }}"
9 session_token: "{{ security_token | default(omit) }}"
10 region: "{{ aws_region }}"
11 tasks:
12 - amazon.aws.ec2_instance_info:
13 register: ec2_info
14
15 - ansible.builtin.assert:
16 that:
17 - '"resource_actions" in ec2_info'
18 - '"ec2:DescribeInstances" in ec2_info.resource_actions'
19
20 - amazon.aws.aws_az_info:
21 register: az_info
22
23 - ansible.builtin.assert:
24 that:
25 - '"resource_actions" in az_info'
26 - '"ec2:DescribeAvailabilityZones" in az_info.resource_actions'
27
28 - amazon.aws.aws_caller_info:
29 register: caller_info
30
31 - ansible.builtin.assert:
32 that:
33 - '"resource_actions" in caller_info'
34 - '"sts:GetCallerIdentity" in caller_info.resource_actions'
35 - '"iam:ListAccountAliases" in caller_info.resource_actions'