diff --git a/changelogs/fragments/tests-fqcn.yml b/changelogs/fragments/tests-fqcn.yml new file mode 100644 index 00000000000..2cdc6b216bb --- /dev/null +++ b/changelogs/fragments/tests-fqcn.yml @@ -0,0 +1,4 @@ +--- +trivial: +- Update FQCN of modules that moved to amazon.aws +- Remove explicit call to ``collections`` from defaults stanza, now we're using FQCNs we don't need to pull it in. diff --git a/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/create_update_delete.yml b/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/create_update_delete.yml index bc8373af941..61ada471835 100644 --- a/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/create_update_delete.yml +++ b/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/create_update_delete.yml @@ -377,7 +377,7 @@ # we need a launch template, otherwise we cannot test the mixed instance policy - name: create launch template for autoscaling group to test its mixed instances policy - community.aws.ec2_launch_template: + amazon.aws.ec2_launch_template: template_name: "{{ resource_prefix }}-lt" image_id: "{{ ec2_ami_id }}" instance_type: t3.micro diff --git a/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/env_cleanup.yml b/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/env_cleanup.yml index e27407deb8a..3072c508136 100644 --- a/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/env_cleanup.yml +++ b/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/env_cleanup.yml @@ -57,7 +57,7 @@ - "{{ resource_prefix }}-lc-2" - name: delete launch template - community.aws.ec2_launch_template: + amazon.aws.ec2_launch_template: name: "{{ resource_prefix }}-lt" state: absent register: del_lt diff --git a/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/main.yml b/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/main.yml index 11d1f42beeb..ba7482ba0f7 100644 --- a/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/main.yml +++ b/tests/integration/targets/autoscaling_group/roles/ec2_asg/tasks/main.yml @@ -15,8 +15,6 @@ # Unfortunately AWSRetry doesn't support paginators and boto3's paginators # don't support any configuration of the delay between retries. max_attempts: 20 - collections: - - community.aws block: # https://github.com/ansible/ansible/issues/77257 - name: Set async_dir for HOME env diff --git a/tests/integration/targets/autoscaling_instance/tasks/env_cleanup.yml b/tests/integration/targets/autoscaling_instance/tasks/env_cleanup.yml index 963e505a69a..c99fff99d8a 100644 --- a/tests/integration/targets/autoscaling_instance/tasks/env_cleanup.yml +++ b/tests/integration/targets/autoscaling_instance/tasks/env_cleanup.yml @@ -32,7 +32,7 @@ - "{{ default_tiny_name }}-2" - name: remove launch templates - community.aws.ec2_launch_template: + amazon.aws.ec2_launch_template: name: "{{ item }}" state: absent register: removed @@ -42,15 +42,7 @@ loop: - "{{ default_resource_name }}-1" - "{{ default_resource_name }}-2" - -- name: delete launch template - community.aws.ec2_launch_template: - name: "{{ default_resource_name }}" - state: absent - register: del_lt - retries: 10 - until: del_lt is not failed - ignore_errors: true + - "{{ default_resource_name }}" - ansible.builtin.include_role: name: setup_ec2_vpc diff --git a/tests/integration/targets/autoscaling_instance/tasks/env_setup.yml b/tests/integration/targets/autoscaling_instance/tasks/env_setup.yml index 489503ad954..5eead8fcc59 100644 --- a/tests/integration/targets/autoscaling_instance/tasks/env_setup.yml +++ b/tests/integration/targets/autoscaling_instance/tasks/env_setup.yml @@ -58,7 +58,7 @@ # Note: main autoscaling tests use ASG "Launch Configs", these are being phased out in favour of EC2 # Launch Templates - name: ensure launch templates exist - community.aws.ec2_launch_template: + amazon.aws.ec2_launch_template: name: "{{ item }}" network_interfaces: - device_index: 0 diff --git a/tests/integration/targets/autoscaling_instance/tasks/main.yml b/tests/integration/targets/autoscaling_instance/tasks/main.yml index fbd45db5eda..23b97c956db 100644 --- a/tests/integration/targets/autoscaling_instance/tasks/main.yml +++ b/tests/integration/targets/autoscaling_instance/tasks/main.yml @@ -10,8 +10,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - community.aws block: - ansible.builtin.include_tasks: env_setup.yml - ansible.builtin.include_tasks: tests.yml diff --git a/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml b/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml index 46e343ec29d..3fee7c53c1f 100644 --- a/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml +++ b/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml @@ -157,15 +157,6 @@ - "{{ lc_name_1 }}" - "{{ lc_name_2 }}" - - name: Delete launch template - community.aws.ec2_launch_template: - name: "{{ resource_prefix }}-lt" - state: absent - register: del_lt - retries: 10 - until: del_lt is not failed - ignore_errors: true - - name: Remove the security group amazon.aws.ec2_security_group: name: "{{ sg_name }}" diff --git a/tests/integration/targets/callback_aws_resource_actions/main.yml b/tests/integration/targets/callback_aws_resource_actions/main.yml index 94b79d904e3..9a90044434a 100644 --- a/tests/integration/targets/callback_aws_resource_actions/main.yml +++ b/tests/integration/targets/callback_aws_resource_actions/main.yml @@ -1,8 +1,6 @@ --- - hosts: localhost gather_facts: false - collections: - - amazon.aws module_defaults: group/aws: access_key: "{{ aws_access_key }}" diff --git a/tests/integration/targets/cloudtrail/tasks/main.yml b/tests/integration/targets/cloudtrail/tasks/main.yml index 6f9e8fe4856..a60ececd62d 100644 --- a/tests/integration/targets/cloudtrail/tasks/main.yml +++ b/tests/integration/targets/cloudtrail/tasks/main.yml @@ -30,8 +30,6 @@ amazon.aws.cloudtrail: s3_bucket_name: "{{ s3_bucket_name }}" region: "{{ aws_region }}" - collections: - - amazon.aws block: # ============================================================ # Argument Tests diff --git a/tests/integration/targets/ec2_ami/tasks/main.yml b/tests/integration/targets/ec2_ami/tasks/main.yml index 267e52abb8d..bfe926935f6 100644 --- a/tests/integration/targets/ec2_ami/tasks/main.yml +++ b/tests/integration/targets/ec2_ami/tasks/main.yml @@ -6,8 +6,6 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws block: # ============================================================ diff --git a/tests/integration/targets/ec2_ami_instance/tasks/main.yml b/tests/integration/targets/ec2_ami_instance/tasks/main.yml index 2b3c44c38c1..b830211168e 100644 --- a/tests/integration/targets/ec2_ami_instance/tasks/main.yml +++ b/tests/integration/targets/ec2_ami_instance/tasks/main.yml @@ -6,8 +6,6 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws block: # ============================================================ diff --git a/tests/integration/targets/ec2_ami_snapshot/tasks/main.yml b/tests/integration/targets/ec2_ami_snapshot/tasks/main.yml index 3170cafe04c..1b0252ef761 100644 --- a/tests/integration/targets/ec2_ami_snapshot/tasks/main.yml +++ b/tests/integration/targets/ec2_ami_snapshot/tasks/main.yml @@ -6,8 +6,6 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws block: # ============================================================ diff --git a/tests/integration/targets/ec2_ami_tpm/tasks/main.yml b/tests/integration/targets/ec2_ami_tpm/tasks/main.yml index 6e6ff2bc5e4..eb9a23c5c96 100644 --- a/tests/integration/targets/ec2_ami_tpm/tasks/main.yml +++ b/tests/integration/targets/ec2_ami_tpm/tasks/main.yml @@ -6,8 +6,6 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws block: # ============================================================ diff --git a/tests/integration/targets/ec2_eni/tasks/main.yaml b/tests/integration/targets/ec2_eni/tasks/main.yaml index 40bb443a8b9..cced1e15707 100644 --- a/tests/integration/targets/ec2_eni/tasks/main.yaml +++ b/tests/integration/targets/ec2_eni/tasks/main.yaml @@ -6,11 +6,6 @@ session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws - - ansible.utils - - community.aws - block: # ============================================================ - name: create a VPC diff --git a/tests/integration/targets/ec2_metadata_facts/playbooks/setup.yml b/tests/integration/targets/ec2_metadata_facts/playbooks/setup.yml index aaeda488a7d..f3c9344eef0 100644 --- a/tests/integration/targets/ec2_metadata_facts/playbooks/setup.yml +++ b/tests/integration/targets/ec2_metadata_facts/playbooks/setup.yml @@ -8,10 +8,6 @@ hosts: localhost - collections: - - amazon.aws - - community.aws - vars: vpc_name: "{{ resource_prefix }}-vpc" vpc_seed: "{{ resource_prefix }}" diff --git a/tests/integration/targets/ec2_metadata_facts/playbooks/teardown.yml b/tests/integration/targets/ec2_metadata_facts/playbooks/teardown.yml index 1e6cf20a1db..70bd00aea20 100644 --- a/tests/integration/targets/ec2_metadata_facts/playbooks/teardown.yml +++ b/tests/integration/targets/ec2_metadata_facts/playbooks/teardown.yml @@ -8,10 +8,6 @@ hosts: localhost - collections: - - amazon.aws - - community.aws - tasks: # ============================================================ diff --git a/tests/integration/targets/ec2_security_group/tasks/multi_account.yml b/tests/integration/targets/ec2_security_group/tasks/multi_account.yml index ba627da9cbe..64819304f5e 100644 --- a/tests/integration/targets/ec2_security_group/tasks/multi_account.yml +++ b/tests/integration/targets/ec2_security_group/tasks/multi_account.yml @@ -11,14 +11,14 @@ Description: Created by ansible-test register: vpc_result_2 - name: Peer the secondary-VPC to the main VPC - community.aws.ec2_vpc_peering: + amazon.aws.ec2_vpc_peering: vpc_id: "{{ vpc_result_2.vpc.id }}" peer_vpc_id: "{{ vpc_result.vpc.id }}" peer_owner_id: "{{ caller_facts.account }}" peer_region: "{{ aws_region }}" register: peer_origin - name: Accept the secondary-VPC peering connection in the main VPC - community.aws.ec2_vpc_peering: + amazon.aws.ec2_vpc_peering: peer_vpc_id: "{{ vpc_result_2.vpc.id }}" vpc_id: "{{ vpc_result.vpc.id }}" state: accept @@ -83,7 +83,7 @@ always: - ansible.builtin.pause: seconds=5 - name: Delete secondary-VPC side of peer - community.aws.ec2_vpc_peering: + amazon.aws.ec2_vpc_peering: vpc_id: "{{ vpc_result_2.vpc.id }}" peer_vpc_id: "{{ vpc_result.vpc.id }}" peering_id: "{{ peer_origin.peering_id }}" @@ -92,7 +92,7 @@ peer_region: "{{ aws_region }}" ignore_errors: true - name: Delete main-VPC side of peer - community.aws.ec2_vpc_peering: + amazon.aws.ec2_vpc_peering: peer_vpc_id: "{{ vpc_result_2.vpc.id }}" vpc_id: "{{ vpc_result.vpc.id }}" state: absent diff --git a/tests/integration/targets/ec2_snapshot/tasks/main.yml b/tests/integration/targets/ec2_snapshot/tasks/main.yml index 2fe841c32a6..bc33df658ba 100644 --- a/tests/integration/targets/ec2_snapshot/tasks/main.yml +++ b/tests/integration/targets/ec2_snapshot/tasks/main.yml @@ -17,10 +17,6 @@ session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws - - community.aws - block: - name: Gather availability zones amazon.aws.aws_az_info: diff --git a/tests/integration/targets/ec2_spot_instance/tasks/main.yaml b/tests/integration/targets/ec2_spot_instance/tasks/main.yaml index 02c16ae826b..ddd63c70dda 100644 --- a/tests/integration/targets/ec2_spot_instance/tasks/main.yaml +++ b/tests/integration/targets/ec2_spot_instance/tasks/main.yaml @@ -6,10 +6,6 @@ session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws - - community.aws - block: - name: Get available AZs amazon.aws.aws_az_info: diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index c6806e750e1..eacbdd3d9b1 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -217,7 +217,7 @@ - create_result.changed == False - name: Test success with filter - community.aws.ec2_transit_gateway_info: + amazon.aws.ec2_transit_gateway_info: filters: options.multicast-support: enable register: result @@ -229,7 +229,7 @@ # ==== Combine ec2_transit_gateway_info ====================== - name: Test success with no parameters - community.aws.ec2_transit_gateway_info: + amazon.aws.ec2_transit_gateway_info: register: result - name: Assert success with no parameters ansible.builtin.assert: @@ -238,7 +238,7 @@ - result.transit_gateways != [] - name: Test success with single filter - community.aws.ec2_transit_gateway_info: + amazon.aws.ec2_transit_gateway_info: filters: transit-gateway-id: '{{ create_result.transit_gateway.transit_gateway_id }}' register: result @@ -250,7 +250,7 @@ - result.transit_gateways != [] - name: Test empty result set for non-existent tgw id via filter - community.aws.ec2_transit_gateway_info: + amazon.aws.ec2_transit_gateway_info: filters: transit-gateway-id: tgw-00000011111111122 register: result @@ -262,7 +262,7 @@ - result.transit_gateways == [] - name: Test NotFound exception caught and returned empty result set - community.aws.ec2_transit_gateway_info: + amazon.aws.ec2_transit_gateway_info: transit_gateway_id: tgw-00000011111111122 register: result @@ -273,7 +273,7 @@ - result.transit_gateways == [] - name: Test success with multiple filters - community.aws.ec2_transit_gateway_info: + amazon.aws.ec2_transit_gateway_info: filters: options.dns-support: enable options.vpn-ecmp-support: enable diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/cleanup.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/cleanup.yml index 3852478da61..81aae1079a9 100644 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/cleanup.yml +++ b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/cleanup.yml @@ -54,7 +54,7 @@ ignore_errors: true - name: Gather info about all transit gateways - community.aws.ec2_transit_gateway_info: + amazon.aws.ec2_transit_gateway_info: transit_gateway_ids: - '{{ tgw_id }}' - '{{ tgw_id_2 }}' diff --git a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/setup.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/setup.yml index 98965fc0bb7..d52875f1537 100644 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/setup.yml +++ b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/setup.yml @@ -13,9 +13,9 @@ tags: Name: '{{ item.name }}' loop: - - description: Transit Gateway for testing community.aws.ec2_transit_gateway_attachment + - description: Transit Gateway for testing ec2_transit_gateway_attachment name: '{{ tgw_name }}' - - description: Second Transit Gateway for testing community.aws.ec2_transit_gateway_attachment + - description: Second Transit Gateway for testing ec2_transit_gateway_attachment name: '{{ tgw_name_2 }}' register: create_tgws diff --git a/tests/integration/targets/ec2_vol/tasks/main.yml b/tests/integration/targets/ec2_vol/tasks/main.yml index 3867885a7ae..c929372e301 100644 --- a/tests/integration/targets/ec2_vol/tasks/main.yml +++ b/tests/integration/targets/ec2_vol/tasks/main.yml @@ -6,10 +6,6 @@ session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws - - community.aws - block: - name: Create a test VPC amazon.aws.ec2_vpc_net: diff --git a/tests/integration/targets/ec2_vpc_endpoint_service_info/tasks/main.yml b/tests/integration/targets/ec2_vpc_endpoint_service_info/tasks/main.yml index 244a5939eba..9c2f6a882f9 100644 --- a/tests/integration/targets/ec2_vpc_endpoint_service_info/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_endpoint_service_info/tasks/main.yml @@ -6,9 +6,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws - - community.aws block: - name: List all available services (Check Mode) amazon.aws.ec2_vpc_endpoint_service_info: diff --git a/tests/integration/targets/ec2_vpc_route_table/tasks/main.yml b/tests/integration/targets/ec2_vpc_route_table/tasks/main.yml index 15ea0028def..84cf91fd11c 100644 --- a/tests/integration/targets/ec2_vpc_route_table/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_route_table/tasks/main.yml @@ -151,7 +151,7 @@ register: transit_gateway - name: Create VPC attachment - community.aws.ec2_transit_gateway_vpc_attachment: + amazon.aws.ec2_transit_gateway_vpc_attachment: state: present name: "{{ resource_prefix }}_vpc_attachment" transit_gateway: "{{ transit_gateway.transit_gateway.transit_gateway_id }}" @@ -1355,7 +1355,7 @@ # ------------------------------------------------------------------------------------------ - name: Create vgw for gateway route table - community.aws.ec2_vpc_vgw: + amazon.aws.ec2_vpc_vgw: state: present vpc_id: "{{ vpc.vpc.id }}" type: ipsec.1 @@ -1560,14 +1560,14 @@ state: absent ignore_errors: true - name: Destroy VGW - community.aws.ec2_vpc_vgw: + amazon.aws.ec2_vpc_vgw: state: absent type: ipsec.1 name: "{{ resource_prefix }}_vpc" vpc_id: "{{ vpc.vpc.id }}" ignore_errors: true - name: Delete VPC attachment - community.aws.ec2_transit_gateway_vpc_attachment: + amazon.aws.ec2_transit_gateway_vpc_attachment: state: absent id: "{{ vpc_attachment.attachments[0].transit_gateway_attachment_id }}" wait: true diff --git a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml index 5ad7467452b..3543acc9c26 100644 --- a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml @@ -19,7 +19,7 @@ register: vpc_result - name: Create an EC2 VPC gateway and attach it to VPC - community.aws.ec2_vpc_vgw: + amazon.aws.ec2_vpc_vgw: state: present vpc_id: '{{ vpc_result.vpc.id }}' name: '{{ resource_prefix }}-vgw' @@ -33,7 +33,7 @@ register: cgw - name: Create transit gateway - community.aws.ec2_transit_gateway: + amazon.aws.ec2_transit_gateway: description: Transit Gateway for vpn attachment wait: true register: tgw @@ -205,7 +205,7 @@ ignore_errors: true - name: Delete VPN gateway - community.aws.ec2_vpc_vgw: + amazon.aws.ec2_vpc_vgw: state: absent vpn_gateway_id: '{{ vgw.vgw.id }}' register: result @@ -226,7 +226,7 @@ ignore_errors: true - name: Delete transit gateway - community.aws.ec2_transit_gateway: + amazon.aws.ec2_transit_gateway: transit_gateway_id: '{{ tgw.transit_gateway.transit_gateway_id }}' state: absent ignore_errors: true diff --git a/tests/integration/targets/elb_classic_lb/tasks/main.yml b/tests/integration/targets/elb_classic_lb/tasks/main.yml index a3df9a3b30e..53412374274 100644 --- a/tests/integration/targets/elb_classic_lb/tasks/main.yml +++ b/tests/integration/targets/elb_classic_lb/tasks/main.yml @@ -19,10 +19,6 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws - - community.aws - - community.crypto block: - ansible.builtin.include_tasks: missing_params.yml - ansible.builtin.include_tasks: describe_region.yml diff --git a/tests/integration/targets/iam_access_key/tasks/main.yml b/tests/integration/targets/iam_access_key/tasks/main.yml index 9acb812e596..9f2ac4e29ea 100644 --- a/tests/integration/targets/iam_access_key/tasks/main.yml +++ b/tests/integration/targets/iam_access_key/tasks/main.yml @@ -6,8 +6,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - community.aws block: # ================================================================================== # Preparation diff --git a/tests/integration/targets/iam_group/tasks/main.yml b/tests/integration/targets/iam_group/tasks/main.yml index 269cd51ec4c..81978de8080 100644 --- a/tests/integration/targets/iam_group/tasks/main.yml +++ b/tests/integration/targets/iam_group/tasks/main.yml @@ -6,8 +6,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws block: - name: Ensure ansible user exists amazon.aws.iam_user: diff --git a/tests/integration/targets/iam_instance_profile/tasks/main.yml b/tests/integration/targets/iam_instance_profile/tasks/main.yml index cbebc966a31..f8c62e91163 100644 --- a/tests/integration/targets/iam_instance_profile/tasks/main.yml +++ b/tests/integration/targets/iam_instance_profile/tasks/main.yml @@ -9,9 +9,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws - - community.general block: # =================================================================== # Prepare diff --git a/tests/integration/targets/iam_managed_policy/tasks/main.yml b/tests/integration/targets/iam_managed_policy/tasks/main.yml index ec4238b858c..6449ac3793a 100644 --- a/tests/integration/targets/iam_managed_policy/tasks/main.yml +++ b/tests/integration/targets/iam_managed_policy/tasks/main.yml @@ -6,8 +6,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws block: - name: Create IAM group amazon.aws.iam_group: diff --git a/tests/integration/targets/iam_password_policy/tasks/main.yaml b/tests/integration/targets/iam_password_policy/tasks/main.yaml index 8d497813ab6..f2315df5eca 100644 --- a/tests/integration/targets/iam_password_policy/tasks/main.yaml +++ b/tests/integration/targets/iam_password_policy/tasks/main.yaml @@ -5,8 +5,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws block: - name: set iam password policy amazon.aws.iam_password_policy: diff --git a/tests/integration/targets/iam_role/tasks/main.yml b/tests/integration/targets/iam_role/tasks/main.yml index e3de8092446..2e6ff46e75f 100644 --- a/tests/integration/targets/iam_role/tasks/main.yml +++ b/tests/integration/targets/iam_role/tasks/main.yml @@ -27,8 +27,6 @@ region: "{{ aws_region }}" amazon.aws.iam_role: assume_role_policy_document: '{{ lookup("file", "deny-assume.json") }}' - collections: - - community.general block: - ansible.builtin.set_fact: assume_deny_policy: '{{ lookup("file", "deny-assume.json") | from_json }}' diff --git a/tests/integration/targets/inventory_aws_ec2/meta/main.yml b/tests/integration/targets/inventory_aws_ec2/meta/main.yml index 23d65c7ef45..fcadd50dc68 100644 --- a/tests/integration/targets/inventory_aws_ec2/meta/main.yml +++ b/tests/integration/targets/inventory_aws_ec2/meta/main.yml @@ -1,2 +1,3 @@ --- -dependencies: [] +dependencies: + - setup_ec2_facts diff --git a/tests/integration/targets/inventory_aws_ec2/playbooks/manage_ec2_instances.yml b/tests/integration/targets/inventory_aws_ec2/playbooks/manage_ec2_instances.yml index c3e5cdb744e..be1b9dc03fa 100644 --- a/tests/integration/targets/inventory_aws_ec2/playbooks/manage_ec2_instances.yml +++ b/tests/integration/targets/inventory_aws_ec2/playbooks/manage_ec2_instances.yml @@ -3,10 +3,6 @@ connection: local gather_facts: false - collections: - - amazon.aws - - community.aws - vars_files: - vars/main.yml diff --git a/tests/integration/targets/inventory_aws_ec2/playbooks/tasks b/tests/integration/targets/inventory_aws_ec2/playbooks/tasks deleted file mode 120000 index 93c76d61977..00000000000 --- a/tests/integration/targets/inventory_aws_ec2/playbooks/tasks +++ /dev/null @@ -1 +0,0 @@ -../tasks/ \ No newline at end of file diff --git a/tests/integration/targets/inventory_aws_ec2/playbooks/test_inventory_ssm.yml b/tests/integration/targets/inventory_aws_ec2/playbooks/test_inventory_ssm.yml index 139a667b53a..22c84be35ca 100644 --- a/tests/integration/targets/inventory_aws_ec2/playbooks/test_inventory_ssm.yml +++ b/tests/integration/targets/inventory_aws_ec2/playbooks/test_inventory_ssm.yml @@ -4,10 +4,6 @@ gather_facts: false environment: "{{ ansible_test.environment }}" - collections: - - amazon.aws - - community.aws - module_defaults: group/aws: access_key: "{{ aws_access_key }}" @@ -16,20 +12,20 @@ region: "{{ aws_region }}" vars: - ami_details: - owner: 125523088429 - name: Fedora-Cloud-Base-37* - user_data: | - #!/bin/sh - sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm - sudo systemctl start amazon-ssm-agent - os_type: linux + instance_user_data: | + #!/bin/sh + sudo dnf install -y https://s3.amazonaws.com/ec2-downloads-windows/SSMAgent/latest/linux_amd64/amazon-ssm-agent.rpm + sudo systemctl start amazon-ssm-agent iam_role_name: "{{ resource_prefix }}-inventory-ssm" tasks: - block: + - ansible.builtin.include_role: + name: ../setup_ec2_facts + # Create VPC, subnet, security group, and find image_id to create instance - ansible.builtin.include_tasks: tasks/setup.yml + - name: Ensure IAM instance role exists amazon.aws.iam_role: name: "{{ iam_role_name }}" @@ -41,30 +37,15 @@ wait: true register: role_output - - name: AMI Lookup (ami_info) - amazon.aws.ec2_ami_info: - owners: '{{ ami_details.owner | default("amazon") }}' - filters: - architecture: x86_64 - name: "{{ ami_details.name }}" - register: ec2_amis - no_log: true - - - name: Set facts with latest AMIs - vars: - latest_ami: '{{ ec2_amis.images | default([]) | sort(attribute="creation_date") | last }}' - ansible.builtin.set_fact: - latest_ami_id: "{{ ssm_amis | default(latest_ami.image_id) }}" - - name: Create EC2 instance amazon.aws.ec2_instance: instance_type: t3.micro ebs_optimized: true - image_id: "{{ latest_ami_id }}" + image_id: "{{ ec2_ami_id }}" wait: "yes" instance_role: "{{ role_output.iam_role.role_name }}" name: "{{ resource_prefix }}-inventory-ssm" - user_data: "{{ ami_details.user_data }}" + user_data: "{{ instance_user_data }}" state: running tags: TestPrefix: "{{ resource_prefix }}" @@ -91,7 +72,7 @@ amazon.aws.ec2_instance: name: "{{ resource_prefix }}-inventory-std" instance_type: t3.micro - image_id: "{{ latest_ami_id }}" + image_id: "{{ ec2_ami_id }}" wait: true state: running register: _instance diff --git a/tests/integration/targets/inventory_aws_ec2/runme.sh b/tests/integration/targets/inventory_aws_ec2/runme.sh index 4423e21f422..7fd48ef5b5c 100755 --- a/tests/integration/targets/inventory_aws_ec2/runme.sh +++ b/tests/integration/targets/inventory_aws_ec2/runme.sh @@ -29,6 +29,9 @@ export ANSIBLE_INVENTORY=test.aws_ec2.yml # test empty inventory config ansible-playbook playbooks/test_invalid_aws_ec2_inventory_config.yml "$@" +# We're not supposed to have symlinks committed to the repo, add the symlink to make life easier +ln -s ../tasks playbooks/tasks + # create minimal config for tests ansible-playbook playbooks/manage_ec2_instances.yml -e "task=setup" "$@" diff --git a/tests/integration/targets/inventory_aws_ec2/tasks/setup.yml b/tests/integration/targets/inventory_aws_ec2/tasks/setup.yml index f3945dc401a..ed1a2d44d48 100644 --- a/tests/integration/targets/inventory_aws_ec2/tasks/setup.yml +++ b/tests/integration/targets/inventory_aws_ec2/tasks/setup.yml @@ -1,18 +1,10 @@ --- -- name: get image ID to create an instance - amazon.aws.ec2_ami_info: - filters: - architecture: x86_64 - # CentOS Community Platform Engineering (CPE) - owner-id: "125523088429" - virtualization-type: hvm - root-device-type: ebs - name: Fedora-Cloud-Base-37* - register: fedora_images +- ansible.builtin.include_role: + name: ../setup_ec2_facts - name: Set image id, vpc cidr and subnet cidr ansible.builtin.set_fact: - image_id: "{{ fedora_images.images.0.image_id }}" + image_id: "{{ ec2_ami_id }}" vpc_cidr: 10.{{ 256 | random(seed=resource_prefix) }}.0.0/16 subnet_cidr: 10.{{ 256 | random(seed=resource_prefix) }}.0.0/24 diff --git a/tests/integration/targets/inventory_aws_rds/playbooks/populate_cache.yml b/tests/integration/targets/inventory_aws_rds/playbooks/populate_cache.yml index dbd68e8b178..3fef4a536a7 100644 --- a/tests/integration/targets/inventory_aws_rds/playbooks/populate_cache.yml +++ b/tests/integration/targets/inventory_aws_rds/playbooks/populate_cache.yml @@ -5,10 +5,6 @@ environment: "{{ ansible_test.environment }}" - collections: - - amazon.aws - - community.aws - vars_files: - vars/main.yml diff --git a/tests/integration/targets/inventory_aws_rds/playbooks/setup_instance.yml b/tests/integration/targets/inventory_aws_rds/playbooks/setup_instance.yml index f07067b7b73..65dfe4bdc4a 100644 --- a/tests/integration/targets/inventory_aws_rds/playbooks/setup_instance.yml +++ b/tests/integration/targets/inventory_aws_rds/playbooks/setup_instance.yml @@ -5,10 +5,6 @@ environment: "{{ ansible_test.environment }}" - collections: - - amazon.aws - - community.aws - vars_files: - vars/main.yml diff --git a/tests/integration/targets/inventory_aws_rds/playbooks/test_inventory_no_hosts.yml b/tests/integration/targets/inventory_aws_rds/playbooks/test_inventory_no_hosts.yml index 10b620ea3b5..aaa674048b5 100644 --- a/tests/integration/targets/inventory_aws_rds/playbooks/test_inventory_no_hosts.yml +++ b/tests/integration/targets/inventory_aws_rds/playbooks/test_inventory_no_hosts.yml @@ -3,9 +3,6 @@ connection: local gather_facts: false environment: "{{ ansible_test.environment }}" - collections: - - amazon.aws - - community.aws tasks: - name: assert group was populated with inventory but is empty ansible.builtin.assert: diff --git a/tests/integration/targets/inventory_aws_rds/playbooks/test_inventory_with_hostvars_prefix_suffix.yml b/tests/integration/targets/inventory_aws_rds/playbooks/test_inventory_with_hostvars_prefix_suffix.yml index 137a3d23afe..3cbd5b2e30a 100644 --- a/tests/integration/targets/inventory_aws_rds/playbooks/test_inventory_with_hostvars_prefix_suffix.yml +++ b/tests/integration/targets/inventory_aws_rds/playbooks/test_inventory_with_hostvars_prefix_suffix.yml @@ -5,10 +5,6 @@ environment: "{{ ansible_test.environment }}" - collections: - - amazon.aws - - community.aws - vars_files: - vars/main.yml diff --git a/tests/integration/targets/inventory_aws_rds/playbooks/test_populating_inventory_with_constructed.yml b/tests/integration/targets/inventory_aws_rds/playbooks/test_populating_inventory_with_constructed.yml index 8ca3fbd9cbd..be53a8d7551 100644 --- a/tests/integration/targets/inventory_aws_rds/playbooks/test_populating_inventory_with_constructed.yml +++ b/tests/integration/targets/inventory_aws_rds/playbooks/test_populating_inventory_with_constructed.yml @@ -5,10 +5,6 @@ environment: "{{ ansible_test.environment }}" - collections: - - amazon.aws - - community.aws - vars_files: - vars/main.yml diff --git a/tests/integration/targets/kms_key/roles/kms_key/tasks/main.yml b/tests/integration/targets/kms_key/roles/kms_key/tasks/main.yml index c5ae95814eb..f87e9db027e 100644 --- a/tests/integration/targets/kms_key/roles/kms_key/tasks/main.yml +++ b/tests/integration/targets/kms_key/roles/kms_key/tasks/main.yml @@ -1,7 +1,5 @@ --- - name: Integration tests for kms_key - collections: - - community.aws module_defaults: group/aws: access_key: "{{ aws_access_key }}" diff --git a/tests/integration/targets/lambda/tasks/main.yml b/tests/integration/targets/lambda/tasks/main.yml index 3720b4d794a..9db80106785 100644 --- a/tests/integration/targets/lambda/tasks/main.yml +++ b/tests/integration/targets/lambda/tasks/main.yml @@ -6,8 +6,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - community.general block: # https://github.com/ansible/ansible/issues/77257 - name: Set async_dir for HOME env diff --git a/tests/integration/targets/lambda_alias/tasks/main.yml b/tests/integration/targets/lambda_alias/tasks/main.yml index e96aa826992..01cde99cb79 100644 --- a/tests/integration/targets/lambda_alias/tasks/main.yml +++ b/tests/integration/targets/lambda_alias/tasks/main.yml @@ -6,8 +6,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - community.general block: # ============================================================== # Preparation diff --git a/tests/integration/targets/lambda_layer/tasks/main.yml b/tests/integration/targets/lambda_layer/tasks/main.yml index b60c3ed1e6a..4384aa56ad1 100644 --- a/tests/integration/targets/lambda_layer/tasks/main.yml +++ b/tests/integration/targets/lambda_layer/tasks/main.yml @@ -6,9 +6,6 @@ session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - amazon.aws - vars: s3_bucket_name: "{{ resource_prefix }}-bucket" s3_bucket_object: "{{ resource_prefix }}-obj-1" diff --git a/tests/integration/targets/lambda_policy/tasks/main.yml b/tests/integration/targets/lambda_policy/tasks/main.yml index e222f9fa6b0..1289434425c 100644 --- a/tests/integration/targets/lambda_policy/tasks/main.yml +++ b/tests/integration/targets/lambda_policy/tasks/main.yml @@ -6,10 +6,6 @@ secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" - collections: - - community.general - - amazon.aws - - community.aws block: - name: create minimal lambda role amazon.aws.iam_role: diff --git a/tests/integration/targets/lookup_secretsmanager_secret/tasks/main.yaml b/tests/integration/targets/lookup_secretsmanager_secret/tasks/main.yaml index e2e18e51247..74726e8c1ea 100644 --- a/tests/integration/targets/lookup_secretsmanager_secret/tasks/main.yaml +++ b/tests/integration/targets/lookup_secretsmanager_secret/tasks/main.yaml @@ -14,9 +14,6 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws - - community.aws block: - name: define secret name ansible.builtin.set_fact: diff --git a/tests/integration/targets/lookup_ssm_parameter/tasks/main.yml b/tests/integration/targets/lookup_ssm_parameter/tasks/main.yml index 83a8dcce1cd..ed8cbe5fbb8 100644 --- a/tests/integration/targets/lookup_ssm_parameter/tasks/main.yml +++ b/tests/integration/targets/lookup_ssm_parameter/tasks/main.yml @@ -9,9 +9,6 @@ no_log: true - name: aws_ssm lookup plugin integration tests - collections: - - amazon.aws - - community.aws module_defaults: group/aws: access_key: "{{ aws_access_key }}" @@ -139,7 +136,7 @@ value: "{{ path_value_c }}" - name: Create nested key/value pair in aws parameter store (4) - ssm_parameter: + community.aws.ssm_parameter: name: '{{ path_name_d }}' description: '{{ path_description }}' value: '{{ path_value_d }}' diff --git a/tests/integration/targets/module_utils_core/main.yml b/tests/integration/targets/module_utils_core/main.yml index 35a96687e76..9c2f3fa14f9 100644 --- a/tests/integration/targets/module_utils_core/main.yml +++ b/tests/integration/targets/module_utils_core/main.yml @@ -1,9 +1,6 @@ --- - hosts: all gather_facts: false - collections: - - amazon.aws - - community.aws roles: # Test the behaviour of module_utils.core.AnsibleAWSModule.client (boto3) - ansibleawsmodule.client diff --git a/tests/integration/targets/module_utils_waiter/main.yml b/tests/integration/targets/module_utils_waiter/main.yml index c02d5da75c6..2bb3fc49036 100644 --- a/tests/integration/targets/module_utils_waiter/main.yml +++ b/tests/integration/targets/module_utils_waiter/main.yml @@ -1,8 +1,6 @@ --- - hosts: all gather_facts: false - collections: - - amazon.aws roles: # Test the behaviour of module_utils.core.AnsibleAWSModule.client (boto3) - get_waiter diff --git a/tests/integration/targets/rds_cluster_multi_az/tasks/main.yml b/tests/integration/targets/rds_cluster_multi_az/tasks/main.yml index 6caf33e2fc0..adbebf1c21a 100644 --- a/tests/integration/targets/rds_cluster_multi_az/tasks/main.yml +++ b/tests/integration/targets/rds_cluster_multi_az/tasks/main.yml @@ -5,8 +5,6 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws block: - name: Ensure the resource doesn't exist diff --git a/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml b/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml index 5adc4c61e6f..25165e37765 100644 --- a/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml +++ b/tests/integration/targets/rds_cluster_snapshot/tasks/main.yml @@ -5,8 +5,7 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws + block: - name: Create a source DB cluster amazon.aws.rds_cluster: diff --git a/tests/integration/targets/rds_instance_aurora/tasks/main.yml b/tests/integration/targets/rds_instance_aurora/tasks/main.yml index 9896d043154..db2fec81f53 100644 --- a/tests/integration/targets/rds_instance_aurora/tasks/main.yml +++ b/tests/integration/targets/rds_instance_aurora/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / aurora integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: Ensure the resource doesn't exist amazon.aws.rds_instance: diff --git a/tests/integration/targets/rds_instance_complex/tasks/main.yml b/tests/integration/targets/rds_instance_complex/tasks/main.yml index 51ff777eaaf..4a6813b1fe6 100644 --- a/tests/integration/targets/rds_instance_complex/tasks/main.yml +++ b/tests/integration/targets/rds_instance_complex/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / complex integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: #TODO: test availability_zone and multi_az - name: Ensure the resource doesn't exist diff --git a/tests/integration/targets/rds_instance_modify/tasks/main.yml b/tests/integration/targets/rds_instance_modify/tasks/main.yml index 4010fd36ce6..7a8ba788810 100644 --- a/tests/integration/targets/rds_instance_modify/tasks/main.yml +++ b/tests/integration/targets/rds_instance_modify/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / modify integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: Ensure the resource doesn't exist amazon.aws.rds_instance: diff --git a/tests/integration/targets/rds_instance_processor/tasks/main.yml b/tests/integration/targets/rds_instance_processor/tasks/main.yml index c6a40d4b0fa..56aeebb1bf4 100644 --- a/tests/integration/targets/rds_instance_processor/tasks/main.yml +++ b/tests/integration/targets/rds_instance_processor/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / processor integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: Ensure the resource doesn't exist amazon.aws.rds_instance: diff --git a/tests/integration/targets/rds_instance_replica/tasks/main.yml b/tests/integration/targets/rds_instance_replica/tasks/main.yml index 636a0d7c65f..56c212aac4a 100644 --- a/tests/integration/targets/rds_instance_replica/tasks/main.yml +++ b/tests/integration/targets/rds_instance_replica/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / replica integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: set the two regions for the source DB and the replica ansible.builtin.set_fact: diff --git a/tests/integration/targets/rds_instance_restore/tasks/main.yml b/tests/integration/targets/rds_instance_restore/tasks/main.yml index 528b7ca603a..48e31876fd1 100644 --- a/tests/integration/targets/rds_instance_restore/tasks/main.yml +++ b/tests/integration/targets/rds_instance_restore/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / restore integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: # TODO: snapshot, s3 diff --git a/tests/integration/targets/rds_instance_sgroups/tasks/main.yml b/tests/integration/targets/rds_instance_sgroups/tasks/main.yml index 182f09e822f..ee85f482834 100644 --- a/tests/integration/targets/rds_instance_sgroups/tasks/main.yml +++ b/tests/integration/targets/rds_instance_sgroups/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / sgroups integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: create a VPC amazon.aws.ec2_vpc_net: diff --git a/tests/integration/targets/rds_instance_snapshot/tasks/main.yml b/tests/integration/targets/rds_instance_snapshot/tasks/main.yml index fccc4e92582..ddaab5167f5 100644 --- a/tests/integration/targets/rds_instance_snapshot/tasks/main.yml +++ b/tests/integration/targets/rds_instance_snapshot/tasks/main.yml @@ -5,9 +5,6 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - community.aws - - amazon.aws block: - name: Create a source mariadb instance diff --git a/tests/integration/targets/rds_instance_snapshot_mgmt/tasks/main.yml b/tests/integration/targets/rds_instance_snapshot_mgmt/tasks/main.yml index 620a8963b3a..8f05d3b4e42 100644 --- a/tests/integration/targets/rds_instance_snapshot_mgmt/tasks/main.yml +++ b/tests/integration/targets/rds_instance_snapshot_mgmt/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / snapshot_mgmt integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: Ensure the resource doesn't exist amazon.aws.rds_instance: diff --git a/tests/integration/targets/rds_instance_states/tasks/main.yml b/tests/integration/targets/rds_instance_states/tasks/main.yml index fa221b145c6..8221c3ab30c 100644 --- a/tests/integration/targets/rds_instance_states/tasks/main.yml +++ b/tests/integration/targets/rds_instance_states/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / states integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: Ensure the resource doesn't exist amazon.aws.rds_instance: diff --git a/tests/integration/targets/rds_instance_tagging/tasks/main.yml b/tests/integration/targets/rds_instance_tagging/tasks/main.yml index 69a3c815b00..146ac2099e1 100644 --- a/tests/integration/targets/rds_instance_tagging/tasks/main.yml +++ b/tests/integration/targets/rds_instance_tagging/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / tagging integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: Test tagging db with storage type gp3 ansible.builtin.import_tasks: test_tagging_gp3.yml diff --git a/tests/integration/targets/rds_instance_upgrade/tasks/main.yml b/tests/integration/targets/rds_instance_upgrade/tasks/main.yml index de1705d3a5c..cd11fa60aaf 100644 --- a/tests/integration/targets/rds_instance_upgrade/tasks/main.yml +++ b/tests/integration/targets/rds_instance_upgrade/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: rds_instance / upgrade integration tests - collections: - - community.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: - name: Ensure the resource doesn't exist amazon.aws.rds_instance: diff --git a/tests/integration/targets/route53_zone/tasks/main.yml b/tests/integration/targets/route53_zone/tasks/main.yml index 3c7abdc0fbb..812c8329f6e 100644 --- a/tests/integration/targets/route53_zone/tasks/main.yml +++ b/tests/integration/targets/route53_zone/tasks/main.yml @@ -1,13 +1,13 @@ --- - name: route53_zone integration tests - collections: - - amazon.aws + module_defaults: group/aws: access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" + block: # ============================================================ diff --git a/tests/integration/targets/setup_ec2_facts/defaults/main.yml b/tests/integration/targets/setup_ec2_facts/defaults/main.yml index 50ad2d5d037..213f2d681a7 100644 --- a/tests/integration/targets/setup_ec2_facts/defaults/main.yml +++ b/tests/integration/targets/setup_ec2_facts/defaults/main.yml @@ -1,5 +1,6 @@ --- -ec2_ami_name: Fedora-Cloud-Base-*.x86_64* +# We don't want to pick up ELN/Rawhide +ec2_ami_name: Fedora-Cloud-Base-*.x86_64-4* # CentOS Community Platform Engineering (CPE) ec2_ami_owner_id: "125523088429" ec2_ami_ssh_user: fedora diff --git a/tests/integration/targets/sts_assume_role/tasks/main.yml b/tests/integration/targets/sts_assume_role/tasks/main.yml index 7fdeb71e504..c528ac3437d 100644 --- a/tests/integration/targets/sts_assume_role/tasks/main.yml +++ b/tests/integration/targets/sts_assume_role/tasks/main.yml @@ -7,8 +7,7 @@ access_key: "{{ aws_access_key }}" secret_key: "{{ aws_secret_key }}" session_token: "{{ security_token | default(omit) }}" - collections: - - amazon.aws + block: # Get some information about who we are before starting our tests # we'll need this as soon as we start working on the policies