From 4a5b50e9b9c0d6ca1a1f802f3b03d4f503c16885 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Thu, 31 Aug 2023 17:58:59 +0200 Subject: [PATCH] Mass update of docs and tests (credentials/session tokens) (#1921) Mass update of docs and tests (credentials/session tokens) SUMMARY We had a cleanup of credentials/session parameters which included a batch of deprecations and renames. Ensure that all of our tests and docs are using the 'canonical' names ISSUE TYPE Docs Pull Request COMPONENT NAME plugins/modules/batch_compute_environment.py plugins/modules/cloudformation_exports_info.py plugins/modules/ec2_vpc_vpn.py plugins/modules/elasticache.py plugins/modules/elasticache_parameter_group.py plugins/modules/elasticache_snapshot.py plugins/modules/ses_rule_set.py plugins/modules/sts_assume_role.py plugins/modules/sts_session_token.py tests/integration ADDITIONAL INFORMATION See also ansible-collections/amazon.aws#1172 ansible-collections/amazon.aws#1714 Reviewed-by: Alina Buzachis --- .../fragments/botocore_params-cleanup.yml | 2 + plugins/modules/batch_compute_environment.py | 6 +- .../modules/cloudformation_exports_info.py | 5 +- plugins/modules/ec2_vpc_vpn.py | 3 +- plugins/modules/elasticache.py | 3 +- .../modules/elasticache_parameter_group.py | 5 +- plugins/modules/elasticache_snapshot.py | 3 +- plugins/modules/ses_rule_set.py | 5 +- plugins/modules/sts_assume_role.py | 13 ++-- plugins/modules/sts_session_token.py | 15 +++-- .../tasks/main.yml | 8 +-- .../acm_certificate/tasks/full_acm_test.yml | 6 +- .../targets/acm_certificate/tasks/main.yml | 6 +- .../targets/api_gateway/tasks/main.yml | 6 +- .../targets/api_gateway_domain/tasks/main.yml | 6 +- .../tasks/main.yml | 6 +- .../tasks/main.yml | 6 +- .../tasks/refresh_and_cancel_three_times.yml | 8 +-- .../autoscaling_launch_config/tasks/main.yml | 6 +- .../autoscaling_lifecycle_hook/main.yml | 6 +- .../ec2_asg_lifecycle_hook/tasks/main.yml | 6 +- .../targets/autoscaling_policy/tasks/main.yml | 6 +- .../tasks/main.yml | 6 +- .../targets/aws_region_info/tasks/main.yml | 8 +-- .../tasks/main.yml | 6 +- .../cloudformation_stack_set/tasks/main.yml | 12 ++-- .../cloudfront_distribution/tasks/main.yml | 10 +--- .../cloudfront_invalidation/tasks/main.yml | 6 +- .../tasks/main.yml | 6 +- .../task/main.yml | 6 +- .../targets/codebuild_project/tasks/main.yml | 6 +- .../codecommit_repository/tasks/main.yml | 6 +- .../targets/codepipeline/tasks/main.yml | 6 +- .../targets/config/tasks/main.yaml | 6 +- .../targets/dms_endpoint/tasks/main.yml | 6 +- .../tasks/main.yml | 6 +- .../targets/dynamodb_table/tasks/main.yml | 6 +- .../ec2_carrier_gateway/tasks/main.yml | 6 +- .../ec2_launch_template/tasks/main.yml | 6 +- .../ec2_placement_group/tasks/main.yml | 6 +- .../ec2_transit_gateway/tasks/main.yml | 6 +- .../tasks/main.yml | 6 +- .../targets/ec2_vpc_egress_igw/tasks/main.yml | 6 +- .../targets/ec2_vpc_nacl/tasks/main.yml | 6 +- .../targets/ec2_vpc_peer/tasks/main.yml | 6 +- .../targets/ec2_vpc_vgw/tasks/main.yml | 6 +- .../targets/ec2_vpc_vpn/tasks/main.yml | 6 +- .../tasks/01_create_requirements.yml | 6 +- .../targets/ecs_cluster/tasks/main.yml | 6 +- .../targets/ecs_ecr/tasks/main.yml | 6 +- .../targets/ecs_tag/tasks/main.yml | 8 +-- tests/integration/targets/efs/tasks/main.yml | 60 +++++++++---------- .../targets/eks_cluster/tasks/full_test.yml | 6 +- .../targets/eks_cluster/tasks/main.yml | 6 +- .../tasks/create_eks_cluster.yml | 2 +- .../eks_fargate_profile/tasks/main.yaml | 6 +- .../targets/eks_nodegroup/tasks/main.yml | 6 +- .../targets/elasticache/tasks/main.yml | 6 +- .../elasticache_subnet_group/tasks/main.yml | 6 +- .../elasticbeanstalk_app/tasks/main.yml | 6 +- .../elb_classic_lb_info/tasks/main.yml | 56 ++++++++--------- .../targets/elb_instance/tasks/main.yml | 6 +- .../targets/elb_network_lb/tasks/main.yml | 6 +- .../targets/elb_target/tasks/main.yml | 6 +- .../targets/elb_target_info/tasks/main.yml | 6 +- .../targets/glue_connection/tasks/main.yml | 6 +- .../targets/glue_crawler/tasks/main.yml | 6 +- .../targets/glue_job/tasks/main.yml | 6 +- .../targets/iam_access_key/tasks/main.yml | 24 ++++---- .../targets/iam_group/tasks/main.yml | 6 +- .../targets/iam_managed_policy/tasks/main.yml | 6 +- .../iam_password_policy/tasks/main.yaml | 6 +- .../targets/iam_role/tasks/main.yml | 6 +- .../iam_saml_federation/tasks/main.yml | 6 +- .../iam_server_certificate/tasks/main.yml | 6 +- .../targets/inspector_target/tasks/main.yml | 6 +- .../playbooks/populate_cache.yml | 6 +- .../playbooks/setup_instance.yml | 6 +- .../inventory_aws_mq/templates/inventory.j2 | 6 +- .../templates/inventory_with_cache.j2 | 6 +- .../templates/inventory_with_constructed.j2 | 6 +- .../inventory_with_hostvars_prefix_suffix.j2 | 6 +- .../targets/kinesis_stream/tasks/main.yml | 6 +- .../targets/lightsail/tasks/main.yml | 8 +-- .../targets/lightsail_snapshot/tasks/main.yml | 10 ++-- .../lightsail_static_ip/tasks/main.yml | 8 +-- tests/integration/targets/mq/tasks/main.yml | 6 +- .../targets/msk_cluster-auth/tasks/main.yml | 6 +- .../targets/msk_cluster/tasks/main.yml | 6 +- .../targets/msk_config/tasks/main.yml | 6 +- .../targets/networkfirewall/tasks/main.yml | 6 +- .../networkfirewall_policy/tasks/main.yml | 8 +-- .../networkfirewall_rule_group/tasks/main.yml | 8 +-- .../targets/opensearch/tasks/main.yml | 6 +- .../targets/redshift/tasks/main.yml | 6 +- .../redshift_subnet_group/tasks/main.yml | 6 +- .../targets/s3_bucket_info/tasks/main.yml | 6 +- .../s3_bucket_notification/tasks/main.yml | 6 +- .../targets/s3_lifecycle/tasks/main.yml | 6 +- .../targets/s3_logging/tasks/main.yml | 6 +- .../s3_metrics_configuration/tasks/main.yml | 8 +-- .../tasks/s3_metrics_info.yml | 6 +- .../targets/s3_sync/tasks/main.yml | 6 +- .../secretsmanager_secret/tasks/basic.yml | 6 +- .../secretsmanager_secret/tasks/main.yaml | 6 +- .../secretsmanager_secret/tasks/rotation.yml | 6 +- .../ses_identity/tasks/assert_defaults.yaml | 4 +- .../targets/ses_identity/tasks/main.yaml | 6 +- .../ses_identity_policy/tasks/main.yaml | 6 +- .../ses_rule_set/tasks/cleanup-lock.yaml | 6 +- .../targets/ses_rule_set/tasks/main.yaml | 6 +- .../tasks/cleanup.yml | 6 +- .../tasks/connection_args.yml | 6 +- .../setup_connection_aws_ssm/tasks/main.yml | 6 +- .../targets/setup_ec2_facts/tasks/main.yml | 6 +- tests/integration/targets/sns/tasks/main.yml | 6 +- .../targets/sns_topic/tasks/main.yml | 6 +- .../targets/sqs_queue/tasks/main.yml | 6 +- .../targets/ssm_parameter/tasks/main.yml | 12 ++-- .../tasks/main.yml | 6 +- .../targets/sts_assume_role/tasks/main.yml | 24 ++++---- .../targets/sts_session_token/tasks/main.yml | 12 ++-- .../targets/waf_web_acl/tasks/main.yml | 6 +- .../integration/targets/wafv2/tasks/main.yml | 34 +---------- .../targets/wafv2_ip_set/tasks/main.yml | 6 +- .../targets/wafv2_rule_group/tasks/main.yml | 6 +- .../targets/wafv2_web_acl/tasks/main.yml | 6 +- 127 files changed, 468 insertions(+), 500 deletions(-) create mode 100644 changelogs/fragments/botocore_params-cleanup.yml diff --git a/changelogs/fragments/botocore_params-cleanup.yml b/changelogs/fragments/botocore_params-cleanup.yml new file mode 100644 index 00000000000..b92b6606e75 --- /dev/null +++ b/changelogs/fragments/botocore_params-cleanup.yml @@ -0,0 +1,2 @@ +trivial: +- update docs and tests to use canonical parameter names for credentials. diff --git a/plugins/modules/batch_compute_environment.py b/plugins/modules/batch_compute_environment.py index cbe1184b2fe..d7ee4ebc1f5 100644 --- a/plugins/modules/batch_compute_environment.py +++ b/plugins/modules/batch_compute_environment.py @@ -165,15 +165,15 @@ changed: false invocation: module_args: - aws_access_key: ~ - aws_secret_key: ~ + access_key: ~ + secret_key: ~ bid_percentage: ~ compute_environment_name: compute_environment_state: ENABLED compute_resource_type: EC2 desiredv_cpus: 0 ec2_key_pair: ~ - ec2_url: ~ + endpoint_url: ~ image_id: ~ instance_role: "arn:aws:iam::..." instance_types: diff --git a/plugins/modules/cloudformation_exports_info.py b/plugins/modules/cloudformation_exports_info.py index 3c93c6a3459..cf769606d47 100644 --- a/plugins/modules/cloudformation_exports_info.py +++ b/plugins/modules/cloudformation_exports_info.py @@ -19,10 +19,9 @@ """ EXAMPLES = r""" +# Note: These examples do not set authentication details, see the AWS Guide for details. - name: Get Exports - community.aws.cloudformation_exports_info: - profile: 'my_aws_profile' - region: 'my_region' + community.aws.cloudformation_exports_info: {} register: cf_exports - ansible.builtin.debug: msg: "{{ cf_exports }}" diff --git a/plugins/modules/ec2_vpc_vpn.py b/plugins/modules/ec2_vpc_vpn.py index 3e4987d9725..abc97f796b7 100644 --- a/plugins/modules/ec2_vpc_vpn.py +++ b/plugins/modules/ec2_vpc_vpn.py @@ -143,8 +143,7 @@ """ EXAMPLES = r""" -# Note: None of these examples set aws_access_key, aws_secret_key, or region. -# It is assumed that their matching environment variables are set. +# Note: These examples do not set authentication details, see the AWS Guide for details. - name: create a VPN connection with vpn_gateway_id community.aws.ec2_vpc_vpn: diff --git a/plugins/modules/elasticache.py b/plugins/modules/elasticache.py index e7a9b1808ff..d45509cb606 100644 --- a/plugins/modules/elasticache.py +++ b/plugins/modules/elasticache.py @@ -103,8 +103,7 @@ RETURN = r""" # """ EXAMPLES = r""" -# Note: None of these examples set aws_access_key, aws_secret_key, or region. -# It is assumed that their matching environment variables are set. +# Note: These examples do not set authentication details, see the AWS Guide for details. - name: Basic example community.aws.elasticache: diff --git a/plugins/modules/elasticache_parameter_group.py b/plugins/modules/elasticache_parameter_group.py index 20f5ed9838b..00f2af19a08 100644 --- a/plugins/modules/elasticache_parameter_group.py +++ b/plugins/modules/elasticache_parameter_group.py @@ -50,9 +50,8 @@ """ EXAMPLES = r""" -# Note: None of these examples set aws_access_key, aws_secret_key, or region. -# It is assumed that their matching environment variables are set. ---- +# Note: These examples do not set authentication details, see the AWS Guide for details. + - hosts: localhost connection: local tasks: diff --git a/plugins/modules/elasticache_snapshot.py b/plugins/modules/elasticache_snapshot.py index b6b6f55069c..0816527fb4f 100644 --- a/plugins/modules/elasticache_snapshot.py +++ b/plugins/modules/elasticache_snapshot.py @@ -49,8 +49,7 @@ """ EXAMPLES = r""" -# Note: None of these examples set aws_access_key, aws_secret_key, or region. -# It is assumed that their matching environment variables are set. +# Note: These examples do not set authentication details, see the AWS Guide for details. - name: 'Create a snapshot' community.aws.elasticache_snapshot: diff --git a/plugins/modules/ses_rule_set.py b/plugins/modules/ses_rule_set.py index 8d09965774f..cf478c0f90a 100644 --- a/plugins/modules/ses_rule_set.py +++ b/plugins/modules/ses_rule_set.py @@ -50,9 +50,8 @@ """ EXAMPLES = r""" -# Note: None of these examples set aws_access_key, aws_secret_key, or region. -# It is assumed that their matching environment variables are set. ---- +# Note: These examples do not set authentication details, see the AWS Guide for details. + - name: Create default rule set and activate it if not already community.aws.ses_rule_set: name: default-rule-set diff --git a/plugins/modules/sts_assume_role.py b/plugins/modules/sts_assume_role.py index 4a4860657cf..4d934c2d5cd 100644 --- a/plugins/modules/sts_assume_role.py +++ b/plugins/modules/sts_assume_role.py @@ -49,7 +49,8 @@ - The value provided by the MFA device, if the trust policy of the role being assumed requires MFA. type: str notes: - - In order to use the assumed role in a following playbook task you must pass the access_key, access_secret and access_token. + - In order to use the assumed role in a following playbook task you must pass the I(access_key), + I(secret_key) and I(session_token) parameters to modules that should use the assumed credentials. extends_documentation_fragment: - amazon.aws.common.modules - amazon.aws.region.modules @@ -80,19 +81,19 @@ """ EXAMPLES = r""" -# Note: These examples do not set authentication details, see the AWS Guide for details. - # Assume an existing role (more details: https://docs.aws.amazon.com/STS/latest/APIReference/API_AssumeRole.html) - community.aws.sts_assume_role: + access_key: AKIA1EXAMPLE1EXAMPLE + secret_key: 123456789abcdefghijklmnopqrstuvwxyzABCDE role_arn: "arn:aws:iam::123456789012:role/someRole" role_session_name: "someRoleSession" register: assumed_role # Use the assumed role above to tag an instance in account 123456789012 - amazon.aws.ec2_tag: - aws_access_key: "{{ assumed_role.sts_creds.access_key }}" - aws_secret_key: "{{ assumed_role.sts_creds.secret_key }}" - security_token: "{{ assumed_role.sts_creds.session_token }}" + access_key: "{{ assumed_role.sts_creds.access_key }}" + secret_key: "{{ assumed_role.sts_creds.secret_key }}" + session_token: "{{ assumed_role.sts_creds.session_token }}" resource: i-xyzxyz01 state: present tags: diff --git a/plugins/modules/sts_session_token.py b/plugins/modules/sts_session_token.py index 8656a96fc3c..044a6367b58 100644 --- a/plugins/modules/sts_session_token.py +++ b/plugins/modules/sts_session_token.py @@ -8,7 +8,7 @@ --- module: sts_session_token version_added: 1.0.0 -short_description: Obtain a session token from the AWS Security Token Service +short_description: obtain a session token from the AWS Security Token Service description: - Obtain a session token from the AWS Security Token Service. author: @@ -29,7 +29,8 @@ - The value provided by the MFA device, if the trust policy of the user requires MFA. type: str notes: - - In order to use the session token in a following playbook task you must pass the I(access_key), I(access_secret) and I(access_token). + - In order to use the session token in a following playbook task you must pass the I(access_key), + I(secret_key) and I(session_token) parameters to modules that should use the session credentials. extends_documentation_fragment: - amazon.aws.common.modules - amazon.aws.region.modules @@ -42,7 +43,7 @@ returned: always type: list sample: - access_key: ASXXXXXXXXXXXXXXXXXX + access_key: ASIAXXXXXXXXXXXXXXXX expiration: "2016-04-08T11:59:47+00:00" secret_key: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX session_token: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX @@ -59,14 +60,16 @@ # (more details: https://docs.aws.amazon.com/STS/latest/APIReference/API_GetSessionToken.html) - name: Get a session token community.aws.sts_session_token: + access_key: AKIA1EXAMPLE1EXAMPLE + secret_key: 123456789abcdefghijklmnopqrstuvwxyzABCDE duration_seconds: 3600 register: session_credentials - name: Use the session token obtained above to tag an instance in account 123456789012 amazon.aws.ec2_tag: - aws_access_key: "{{ session_credentials.sts_creds.access_key }}" - aws_secret_key: "{{ session_credentials.sts_creds.secret_key }}" - security_token: "{{ session_credentials.sts_creds.session_token }}" + access_key: "{{ session_credentials.sts_creds.access_key }}" + secret_key: "{{ session_credentials.sts_creds.secret_key }}" + session_token: "{{ session_credentials.sts_creds.session_token }}" resource: i-xyzxyz01 state: present tags: diff --git a/tests/integration/targets/accessanalyzer_validate_policy_info/tasks/main.yml b/tests/integration/targets/accessanalyzer_validate_policy_info/tasks/main.yml index 857a7c1b495..811ef9fb5a8 100644 --- a/tests/integration/targets/accessanalyzer_validate_policy_info/tasks/main.yml +++ b/tests/integration/targets/accessanalyzer_validate_policy_info/tasks/main.yml @@ -1,10 +1,10 @@ --- - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' block: - name: get ARN of calling user diff --git a/tests/integration/targets/acm_certificate/tasks/full_acm_test.yml b/tests/integration/targets/acm_certificate/tasks/full_acm_test.yml index 5cbd156dd70..1a19e2a395f 100644 --- a/tests/integration/targets/acm_certificate/tasks/full_acm_test.yml +++ b/tests/integration/targets/acm_certificate/tasks/full_acm_test.yml @@ -2,9 +2,9 @@ module_defaults: group/aws: aws_region: '{{ aws_region }}' - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' block: - name: list certs aws_acm_info: null diff --git a/tests/integration/targets/acm_certificate/tasks/main.yml b/tests/integration/targets/acm_certificate/tasks/main.yml index bf70587e67e..92416030776 100644 --- a/tests/integration/targets/acm_certificate/tasks/main.yml +++ b/tests/integration/targets/acm_certificate/tasks/main.yml @@ -2,9 +2,9 @@ module_defaults: group/aws: aws_region: '{{ aws_region }}' - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' block: # The CI runs many of these tests in parallel # Use this random ID to differentiate which resources diff --git a/tests/integration/targets/api_gateway/tasks/main.yml b/tests/integration/targets/api_gateway/tasks/main.yml index 326bf12e63e..2e00128cdb6 100644 --- a/tests/integration/targets/api_gateway/tasks/main.yml +++ b/tests/integration/targets/api_gateway/tasks/main.yml @@ -1,9 +1,9 @@ - name: Wrap API Gateway tests with credentials by default module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/api_gateway_domain/tasks/main.yml b/tests/integration/targets/api_gateway_domain/tasks/main.yml index 76de2657ea3..4721fe37474 100644 --- a/tests/integration/targets/api_gateway_domain/tasks/main.yml +++ b/tests/integration/targets/api_gateway_domain/tasks/main.yml @@ -4,9 +4,9 @@ - name: Run aws_api_gateway_domain module integration tests module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" # NOTE: To make tests work set TLS ARN in defaults/main.yml to an existing and diff --git a/tests/integration/targets/autoscaling_complete_lifecycle_action/tasks/main.yml b/tests/integration/targets/autoscaling_complete_lifecycle_action/tasks/main.yml index d8380d913c2..584719b0d95 100644 --- a/tests/integration/targets/autoscaling_complete_lifecycle_action/tasks/main.yml +++ b/tests/integration/targets/autoscaling_complete_lifecycle_action/tasks/main.yml @@ -2,9 +2,9 @@ - name: "Wrap up all tests and setup AWS credentials" module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - community.aws diff --git a/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml b/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml index 32cfd5378a8..f6780d18b3e 100644 --- a/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml +++ b/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml @@ -2,9 +2,9 @@ - name: setup credentials and region module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: diff --git a/tests/integration/targets/autoscaling_instance_refresh/tasks/refresh_and_cancel_three_times.yml b/tests/integration/targets/autoscaling_instance_refresh/tasks/refresh_and_cancel_three_times.yml index 15fa2100c7f..9ec92e4b5fc 100644 --- a/tests/integration/targets/autoscaling_instance_refresh/tasks/refresh_and_cancel_three_times.yml +++ b/tests/integration/targets/autoscaling_instance_refresh/tasks/refresh_and_cancel_three_times.yml @@ -10,8 +10,8 @@ ec2_asg_instance_refresh: name: "{{ asg_name }}" state: "started" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" region: "{{ aws_region }}" ignore_errors: no retries: 10 @@ -23,7 +23,7 @@ ec2_asg_instance_refresh: name: "{{ asg_name }}" state: "cancelled" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" region: "{{ aws_region }}" ignore_errors: yes diff --git a/tests/integration/targets/autoscaling_launch_config/tasks/main.yml b/tests/integration/targets/autoscaling_launch_config/tasks/main.yml index 6606484b118..747ce994618 100644 --- a/tests/integration/targets/autoscaling_launch_config/tasks/main.yml +++ b/tests/integration/targets/autoscaling_launch_config/tasks/main.yml @@ -1,9 +1,9 @@ - name: run ec2_lc tests module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/autoscaling_lifecycle_hook/main.yml b/tests/integration/targets/autoscaling_lifecycle_hook/main.yml index a2218214619..7a0cff663f7 100644 --- a/tests/integration/targets/autoscaling_lifecycle_hook/main.yml +++ b/tests/integration/targets/autoscaling_lifecycle_hook/main.yml @@ -10,9 +10,9 @@ tasks: - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" vars: # We can't just use "run_once" because the facts don't propagate when diff --git a/tests/integration/targets/autoscaling_lifecycle_hook/roles/ec2_asg_lifecycle_hook/tasks/main.yml b/tests/integration/targets/autoscaling_lifecycle_hook/roles/ec2_asg_lifecycle_hook/tasks/main.yml index 16442c7fa7c..d4510072a4a 100644 --- a/tests/integration/targets/autoscaling_lifecycle_hook/roles/ec2_asg_lifecycle_hook/tasks/main.yml +++ b/tests/integration/targets/autoscaling_lifecycle_hook/roles/ec2_asg_lifecycle_hook/tasks/main.yml @@ -6,9 +6,9 @@ - name: "Wrap up all tests and setup AWS credentials" module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" aws_config: retries: diff --git a/tests/integration/targets/autoscaling_policy/tasks/main.yml b/tests/integration/targets/autoscaling_policy/tasks/main.yml index 24b3eea6209..cd302dc8590 100644 --- a/tests/integration/targets/autoscaling_policy/tasks/main.yml +++ b/tests/integration/targets/autoscaling_policy/tasks/main.yml @@ -12,9 +12,9 @@ - module_defaults: group/aws: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + 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/autoscaling_scheduled_action/tasks/main.yml b/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml index 5c3bd70dd2a..2344a795c63 100644 --- a/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml +++ b/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml @@ -5,9 +5,9 @@ - community.aws module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: ## Set up the testing dependencies: VPC, subnet, security group, and launch configuration diff --git a/tests/integration/targets/aws_region_info/tasks/main.yml b/tests/integration/targets/aws_region_info/tasks/main.yml index 3edbbaded2a..4391bd242ef 100644 --- a/tests/integration/targets/aws_region_info/tasks/main.yml +++ b/tests/integration/targets/aws_region_info/tasks/main.yml @@ -1,10 +1,10 @@ --- - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' block: - name: 'List available Regions' diff --git a/tests/integration/targets/cloudformation_exports_info/tasks/main.yml b/tests/integration/targets/cloudformation_exports_info/tasks/main.yml index eb703d49e60..f1b99df1b0f 100644 --- a/tests/integration/targets/cloudformation_exports_info/tasks/main.yml +++ b/tests/integration/targets/cloudformation_exports_info/tasks/main.yml @@ -1,9 +1,9 @@ - name: set connection information for aws modules and run tasks module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/cloudformation_stack_set/tasks/main.yml b/tests/integration/targets/cloudformation_stack_set/tasks/main.yml index afd614a5583..39f13a71f38 100644 --- a/tests/integration/targets/cloudformation_stack_set/tasks/main.yml +++ b/tests/integration/targets/cloudformation_stack_set/tasks/main.yml @@ -5,14 +5,14 @@ - name: set up aws connection info set_fact: aws_connection_info: &aws_connection_info - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" aws_secondary_connection_info: &aws_secondary_connection_info - aws_access_key: "{{ secondary_aws_access_key }}" - aws_secret_key: "{{ secondary_aws_secret_key }}" - security_token: "{{ secondary_security_token }}" + access_key: "{{ secondary_aws_access_key }}" + secret_key: "{{ secondary_aws_secret_key }}" + session_token: "{{ secondary_security_token | default(omit) }}" region: "{{ aws_region }}" no_log: true diff --git a/tests/integration/targets/cloudfront_distribution/tasks/main.yml b/tests/integration/targets/cloudfront_distribution/tasks/main.yml index 75f11f244b1..c61684b7ce1 100644 --- a/tests/integration/targets/cloudfront_distribution/tasks/main.yml +++ b/tests/integration/targets/cloudfront_distribution/tasks/main.yml @@ -1,8 +1,8 @@ - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" cloudfront_distribution: alias: "{{ cloudfront_alias | default(omit) }}" viewer_certificate: "{{ cloudfront_viewer_cert | default(omit) }}" @@ -502,10 +502,6 @@ # - path_pattern: /another/path # target_origin_id: "{{ resource_prefix }}3.example.com" # state: present - # aws_access_key: "{{ aws_access_key|default(omit) }}" - # aws_secret_key: "{{ aws_secret_key|default(omit) }}" - # security_token: "{{ security_token|default(omit) }}" - # profile: "{{ profile|default(omit) }}" # register: update_cache_behaviors in use - name: create an s3 bucket for next test diff --git a/tests/integration/targets/cloudfront_invalidation/tasks/main.yml b/tests/integration/targets/cloudfront_invalidation/tasks/main.yml index 8460c5cdf20..b42c8915c08 100644 --- a/tests/integration/targets/cloudfront_invalidation/tasks/main.yml +++ b/tests/integration/targets/cloudfront_invalidation/tasks/main.yml @@ -1,8 +1,8 @@ - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" collections: - amazon.aws diff --git a/tests/integration/targets/cloudfront_origin_access_identity/tasks/main.yml b/tests/integration/targets/cloudfront_origin_access_identity/tasks/main.yml index eaebf76b33a..9259108bcd7 100644 --- a/tests/integration/targets/cloudfront_origin_access_identity/tasks/main.yml +++ b/tests/integration/targets/cloudfront_origin_access_identity/tasks/main.yml @@ -1,8 +1,8 @@ - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" collections: - amazon.aws diff --git a/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml b/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml index ee30f5ab5d6..cf48e89c4ba 100644 --- a/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml +++ b/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml @@ -3,9 +3,9 @@ - name: Integration testing for the cloudfront_response_headers_policy module module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/codebuild_project/tasks/main.yml b/tests/integration/targets/codebuild_project/tasks/main.yml index 34083ac574a..584c0f3f54c 100644 --- a/tests/integration/targets/codebuild_project/tasks/main.yml +++ b/tests/integration/targets/codebuild_project/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/codecommit_repository/tasks/main.yml b/tests/integration/targets/codecommit_repository/tasks/main.yml index acf194e1ef1..fe93aae03d7 100644 --- a/tests/integration/targets/codecommit_repository/tasks/main.yml +++ b/tests/integration/targets/codecommit_repository/tasks/main.yml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + 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/codepipeline/tasks/main.yml b/tests/integration/targets/codepipeline/tasks/main.yml index 2e8e7d8f392..04feb1eefd8 100644 --- a/tests/integration/targets/codepipeline/tasks/main.yml +++ b/tests/integration/targets/codepipeline/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/config/tasks/main.yaml b/tests/integration/targets/config/tasks/main.yaml index 8c7f0208855..0c7daa2bb4f 100644 --- a/tests/integration/targets/config/tasks/main.yaml +++ b/tests/integration/targets/config/tasks/main.yaml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/dms_endpoint/tasks/main.yml b/tests/integration/targets/dms_endpoint/tasks/main.yml index 328ea17a5a2..8d12933a464 100644 --- a/tests/integration/targets/dms_endpoint/tasks/main.yml +++ b/tests/integration/targets/dms_endpoint/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/dms_replication_subnet_group/tasks/main.yml b/tests/integration/targets/dms_replication_subnet_group/tasks/main.yml index 0952602f124..712bc82bed1 100644 --- a/tests/integration/targets/dms_replication_subnet_group/tasks/main.yml +++ b/tests/integration/targets/dms_replication_subnet_group/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/dynamodb_table/tasks/main.yml b/tests/integration/targets/dynamodb_table/tasks/main.yml index f7b04227fb1..268e61baeff 100644 --- a/tests/integration/targets/dynamodb_table/tasks/main.yml +++ b/tests/integration/targets/dynamodb_table/tasks/main.yml @@ -7,9 +7,9 @@ # - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: - include_tasks: "test_pay_per_request.yml" diff --git a/tests/integration/targets/ec2_carrier_gateway/tasks/main.yml b/tests/integration/targets/ec2_carrier_gateway/tasks/main.yml index 1ec10c5c18c..4d005b90a5b 100644 --- a/tests/integration/targets/ec2_carrier_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_carrier_gateway/tasks/main.yml @@ -4,9 +4,9 @@ - community.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ec2_launch_template/tasks/main.yml b/tests/integration/targets/ec2_launch_template/tasks/main.yml index aa87871ce0c..e89dfceb557 100644 --- a/tests/integration/targets/ec2_launch_template/tasks/main.yml +++ b/tests/integration/targets/ec2_launch_template/tasks/main.yml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: - include_tasks: cpu_options.yml diff --git a/tests/integration/targets/ec2_placement_group/tasks/main.yml b/tests/integration/targets/ec2_placement_group/tasks/main.yml index 91fd9497c12..4f42a9df28d 100644 --- a/tests/integration/targets/ec2_placement_group/tasks/main.yml +++ b/tests/integration/targets/ec2_placement_group/tasks/main.yml @@ -1,9 +1,9 @@ - name: run ec2_placement_group tests module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml index 6cb279f7716..c7353cfc0a6 100644 --- a/tests/integration/targets/ec2_transit_gateway/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ec2_transit_gateway_vpc_attachment/tasks/main.yml b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/main.yml index 8694b829e7b..ce9659473f6 100644 --- a/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/main.yml +++ b/tests/integration/targets/ec2_transit_gateway_vpc_attachment/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ec2_vpc_egress_igw/tasks/main.yml b/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml index 41540b8d42a..75fff0e4e22 100644 --- a/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_egress_igw/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ec2_vpc_nacl/tasks/main.yml b/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml index e1538049aba..36c7ab2d8bb 100644 --- a/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_nacl/tasks/main.yml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/ec2_vpc_peer/tasks/main.yml b/tests/integration/targets/ec2_vpc_peer/tasks/main.yml index cdb7c668078..b39b69b74b0 100644 --- a/tests/integration/targets/ec2_vpc_peer/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_peer/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: - name: get ARN of calling user diff --git a/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml b/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml index 37bbf5e372d..f5a850a7140 100644 --- a/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_vgw/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ec2_vpc_vpn/tasks/main.yml b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml index cf33bf9e684..9514d7cf350 100644 --- a/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml +++ b/tests/integration/targets/ec2_vpc_vpn/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ecs_cluster/tasks/01_create_requirements.yml b/tests/integration/targets/ecs_cluster/tasks/01_create_requirements.yml index 31ca3cf275e..0d07add14ab 100644 --- a/tests/integration/targets/ecs_cluster/tasks/01_create_requirements.yml +++ b/tests/integration/targets/ecs_cluster/tasks/01_create_requirements.yml @@ -86,9 +86,9 @@ # As a lookup plugin we don't have access to module_defaults connection_args: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - aws_security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" no_log: True - name: set image id fact diff --git a/tests/integration/targets/ecs_cluster/tasks/main.yml b/tests/integration/targets/ecs_cluster/tasks/main.yml index 26dc43dce30..12d3cb52ba8 100644 --- a/tests/integration/targets/ecs_cluster/tasks/main.yml +++ b/tests/integration/targets/ecs_cluster/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ecs_ecr/tasks/main.yml b/tests/integration/targets/ecs_ecr/tasks/main.yml index e0ce4f3f664..2b6773a7bc4 100644 --- a/tests/integration/targets/ecs_ecr/tasks/main.yml +++ b/tests/integration/targets/ecs_ecr/tasks/main.yml @@ -2,9 +2,9 @@ - module_defaults: group/aws: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" block: - set_fact: diff --git a/tests/integration/targets/ecs_tag/tasks/main.yml b/tests/integration/targets/ecs_tag/tasks/main.yml index fff9ee27d5c..597caaaa202 100644 --- a/tests/integration/targets/ecs_tag/tasks/main.yml +++ b/tests/integration/targets/ecs_tag/tasks/main.yml @@ -1,9 +1,9 @@ - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' collections: - amazon.aws block: diff --git a/tests/integration/targets/efs/tasks/main.yml b/tests/integration/targets/efs/tasks/main.yml index d2e9d4bee97..5100927100d 100644 --- a/tests/integration/targets/efs/tasks/main.yml +++ b/tests/integration/targets/efs/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' block: @@ -332,9 +332,9 @@ efs_tag: state: present resource: "{{ created_efs.efs.file_system_id }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: "{{ aws_region }}" tags: check_mode_tag: 'this tag should not be applied' @@ -349,9 +349,9 @@ efs_tag: state: present resource: "{{ created_efs.efs.file_system_id }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: "{{ aws_region }}" tags: "Title Case": 'Hello Cruel World' @@ -377,9 +377,9 @@ efs_tag: state: present resource: "{{ created_efs.efs.file_system_id }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: "{{ aws_region }}" tags: Env: IntegrationTests @@ -394,9 +394,9 @@ efs_tag: state: absent resource: "{{ created_efs.efs.file_system_id }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: "{{ aws_region }}" tags: snake_case: 'simple_snake_case' @@ -412,9 +412,9 @@ efs_tag: state: present resource: "{{ created_efs.efs.file_system_id }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: "{{ aws_region }}" tags: Env: OtherIntegrationTests @@ -430,9 +430,9 @@ efs_tag: state: present resource: "{{ created_efs.efs.file_system_id }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: "{{ aws_region }}" tags: Env: OtherIntegrationTests @@ -448,9 +448,9 @@ efs_tag: state: absent resource: "{{ created_efs.efs.file_system_id }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: "{{ aws_region }}" tags: "Title Case": 'Hello Cruel World' @@ -474,9 +474,9 @@ efs_tag: state: absent resource: "{{ created_efs.efs.file_system_id }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: "{{ aws_region }}" tags: snake_case: 'simple_snake_case' @@ -491,9 +491,9 @@ state: absent resource: "{{ created_efs.efs.file_system_id }}" region: "{{ aws_region }}" - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' tags: {} purge_tags: true register: efs_tag_result diff --git a/tests/integration/targets/eks_cluster/tasks/full_test.yml b/tests/integration/targets/eks_cluster/tasks/full_test.yml index e3aca286386..bc6ebedea2a 100644 --- a/tests/integration/targets/eks_cluster/tasks/full_test.yml +++ b/tests/integration/targets/eks_cluster/tasks/full_test.yml @@ -7,9 +7,9 @@ aws_eks_cluster: name: "{{ eks_cluster_name }}" state: absent - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: us-west-1 register: aws_eks_unsupported_region ignore_errors: yes diff --git a/tests/integration/targets/eks_cluster/tasks/main.yml b/tests/integration/targets/eks_cluster/tasks/main.yml index 61aa32cd19d..0f414f56f6c 100644 --- a/tests/integration/targets/eks_cluster/tasks/main.yml +++ b/tests/integration/targets/eks_cluster/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' block: - include_tasks: full_test.yml diff --git a/tests/integration/targets/eks_fargate_profile/tasks/create_eks_cluster.yml b/tests/integration/targets/eks_fargate_profile/tasks/create_eks_cluster.yml index d5affa5b58d..6023b190492 100644 --- a/tests/integration/targets/eks_fargate_profile/tasks/create_eks_cluster.yml +++ b/tests/integration/targets/eks_fargate_profile/tasks/create_eks_cluster.yml @@ -94,4 +94,4 @@ - name: check that EKS cluster was created assert: that: - - eks_create.name == eks_cluster_name \ No newline at end of file + - eks_create.name == eks_cluster_name diff --git a/tests/integration/targets/eks_fargate_profile/tasks/main.yaml b/tests/integration/targets/eks_fargate_profile/tasks/main.yaml index 77298dc81f1..d6606e3db78 100644 --- a/tests/integration/targets/eks_fargate_profile/tasks/main.yaml +++ b/tests/integration/targets/eks_fargate_profile/tasks/main.yaml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' block: - include_tasks: create_eks_cluster.yml diff --git a/tests/integration/targets/eks_nodegroup/tasks/main.yml b/tests/integration/targets/eks_nodegroup/tasks/main.yml index 9f896bec611..5c1a76f5764 100644 --- a/tests/integration/targets/eks_nodegroup/tasks/main.yml +++ b/tests/integration/targets/eks_nodegroup/tasks/main.yml @@ -5,9 +5,9 @@ - amozon.community module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' block: - include_tasks: dependecies.yml diff --git a/tests/integration/targets/elasticache/tasks/main.yml b/tests/integration/targets/elasticache/tasks/main.yml index 31ae3d9cf77..84604274daf 100644 --- a/tests/integration/targets/elasticache/tasks/main.yml +++ b/tests/integration/targets/elasticache/tasks/main.yml @@ -3,9 +3,9 @@ - name: Integration testing for the elasticache module module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' collections: - amazon.aws diff --git a/tests/integration/targets/elasticache_subnet_group/tasks/main.yml b/tests/integration/targets/elasticache_subnet_group/tasks/main.yml index 5814f9dc90d..921a37eb064 100644 --- a/tests/integration/targets/elasticache_subnet_group/tasks/main.yml +++ b/tests/integration/targets/elasticache_subnet_group/tasks/main.yml @@ -8,9 +8,9 @@ # - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/elasticbeanstalk_app/tasks/main.yml b/tests/integration/targets/elasticbeanstalk_app/tasks/main.yml index d90a7ce8d52..43124d562ba 100644 --- a/tests/integration/targets/elasticbeanstalk_app/tasks/main.yml +++ b/tests/integration/targets/elasticbeanstalk_app/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/elb_classic_lb_info/tasks/main.yml b/tests/integration/targets/elb_classic_lb_info/tasks/main.yml index e4cd8144b1e..dc099388648 100644 --- a/tests/integration/targets/elb_classic_lb_info/tasks/main.yml +++ b/tests/integration/targets/elb_classic_lb_info/tasks/main.yml @@ -18,10 +18,10 @@ - module_defaults: group/aws: - region: "{{ ec2_region }}" - ec2_access_key: "{{ ec2_access_key }}" - ec2_secret_key: "{{ ec2_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + region: "{{ aws_region }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" block: # ============================================================ @@ -32,8 +32,8 @@ name: "{{ elb_name }}" state: present zones: - - "{{ ec2_region }}a" - - "{{ ec2_region }}b" + - "{{ aws_region }}a" + - "{{ aws_region }}b" listeners: - protocol: http load_balancer_port: 80 @@ -55,8 +55,8 @@ that: - create is changed # We rely on these for the info test, make sure they're what we expect - - '"{{ ec2_region }}a" in create.elb.zones' - - '"{{ ec2_region }}b" in create.elb.zones' + - '"{{ aws_region }}a" in create.elb.zones' + - '"{{ aws_region }}b" in create.elb.zones' - create.elb.health_check.healthy_threshold == 10 - create.elb.health_check.interval == 30 - create.elb.health_check.target == "HTTP:80/index.html" @@ -74,8 +74,8 @@ that: - info.elbs|length == 1 - elb.availability_zones|length == 2 - - '"{{ ec2_region }}a" in elb.availability_zones' - - '"{{ ec2_region }}b" in elb.availability_zones' + - '"{{ aws_region }}a" in elb.availability_zones' + - '"{{ aws_region }}b" in elb.availability_zones' - elb.health_check.healthy_threshold == 10 - elb.health_check.interval == 30 - elb.health_check.target == "HTTP:80/index.html" @@ -115,7 +115,7 @@ name: "{{ elb_name }}" state: present zones: - - "{{ ec2_region }}c" + - "{{ aws_region }}c" listeners: - protocol: http load_balancer_port: 80 @@ -134,7 +134,7 @@ - assert: that: - update_az is changed - - update_az.elb.zones[0] == "{{ ec2_region }}c" + - update_az.elb.zones[0] == "{{ aws_region }}c" - name: Get ELB info after changing AZ's elb_classic_lb_info: @@ -144,7 +144,7 @@ - assert: that: - elb.availability_zones|length == 1 - - '"{{ ec2_region }}c" in elb.availability_zones[0]' + - '"{{ aws_region }}c" in elb.availability_zones[0]' vars: elb: "{{ info.elbs[0] }}" @@ -157,9 +157,9 @@ name: "{{ elb_name }}" state: present zones: - - "{{ ec2_region }}a" - - "{{ ec2_region }}b" - - "{{ ec2_region }}c" + - "{{ aws_region }}a" + - "{{ aws_region }}b" + - "{{ aws_region }}c" listeners: - protocol: http load_balancer_port: 80 @@ -170,9 +170,9 @@ - assert: that: - update_az is changed - - '"{{ ec2_region }}a" in update_az.elb.zones' - - '"{{ ec2_region }}b" in update_az.elb.zones' - - '"{{ ec2_region }}c" in update_az.elb.zones' + - '"{{ aws_region }}a" in update_az.elb.zones' + - '"{{ aws_region }}b" in update_az.elb.zones' + - '"{{ aws_region }}c" in update_az.elb.zones' - name: Get ELB info after updating AZ's elb_classic_lb_info: @@ -182,9 +182,9 @@ - assert: that: - elb.availability_zones|length == 3 - - '"{{ ec2_region }}a" in elb.availability_zones' - - '"{{ ec2_region }}b" in elb.availability_zones' - - '"{{ ec2_region }}c" in elb.availability_zones' + - '"{{ aws_region }}a" in elb.availability_zones' + - '"{{ aws_region }}b" in elb.availability_zones' + - '"{{ aws_region }}c" in elb.availability_zones' vars: elb: "{{ info.elbs[0] }}" @@ -197,9 +197,9 @@ name: "{{ elb_name }}" state: present zones: - - "{{ ec2_region }}a" - - "{{ ec2_region }}b" - - "{{ ec2_region }}c" + - "{{ aws_region }}a" + - "{{ aws_region }}b" + - "{{ aws_region }}c" listeners: - protocol: http load_balancer_port: 80 @@ -235,9 +235,9 @@ name: "{{ elb_name }}" state: present zones: - - "{{ ec2_region }}a" - - "{{ ec2_region }}b" - - "{{ ec2_region }}c" + - "{{ aws_region }}a" + - "{{ aws_region }}b" + - "{{ aws_region }}c" listeners: - protocol: http load_balancer_port: 8081 diff --git a/tests/integration/targets/elb_instance/tasks/main.yml b/tests/integration/targets/elb_instance/tasks/main.yml index 247b6f6b6c1..3ab9be64d27 100644 --- a/tests/integration/targets/elb_instance/tasks/main.yml +++ b/tests/integration/targets/elb_instance/tasks/main.yml @@ -2,9 +2,9 @@ - module_defaults: group/aws: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" collections: - community.aws - amazon.aws diff --git a/tests/integration/targets/elb_network_lb/tasks/main.yml b/tests/integration/targets/elb_network_lb/tasks/main.yml index cf0a13ec496..16739543d04 100644 --- a/tests/integration/targets/elb_network_lb/tasks/main.yml +++ b/tests/integration/targets/elb_network_lb/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/elb_target/tasks/main.yml b/tests/integration/targets/elb_target/tasks/main.yml index e99118c6408..8f03edfa800 100644 --- a/tests/integration/targets/elb_target/tasks/main.yml +++ b/tests/integration/targets/elb_target/tasks/main.yml @@ -2,9 +2,9 @@ - name: set up elb_target test prerequisites module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - community.general diff --git a/tests/integration/targets/elb_target_info/tasks/main.yml b/tests/integration/targets/elb_target_info/tasks/main.yml index fc11cdbcd4a..201620c3f31 100644 --- a/tests/integration/targets/elb_target_info/tasks/main.yml +++ b/tests/integration/targets/elb_target_info/tasks/main.yml @@ -2,9 +2,9 @@ - name: set up elb_target_info test prerequisites module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/glue_connection/tasks/main.yml b/tests/integration/targets/glue_connection/tasks/main.yml index 837f9bd17e3..c11b297afdf 100644 --- a/tests/integration/targets/glue_connection/tasks/main.yml +++ b/tests/integration/targets/glue_connection/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: - include_tasks: test_connection_network.yml diff --git a/tests/integration/targets/glue_crawler/tasks/main.yml b/tests/integration/targets/glue_crawler/tasks/main.yml index b96968195c3..143e0ad0707 100644 --- a/tests/integration/targets/glue_crawler/tasks/main.yml +++ b/tests/integration/targets/glue_crawler/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + 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/glue_job/tasks/main.yml b/tests/integration/targets/glue_job/tasks/main.yml index 307a9befb23..0f367d499d6 100644 --- a/tests/integration/targets/glue_job/tasks/main.yml +++ b/tests/integration/targets/glue_job/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: # AWS CLI is needed until there's a module to get info about Glue jobs diff --git a/tests/integration/targets/iam_access_key/tasks/main.yml b/tests/integration/targets/iam_access_key/tasks/main.yml index a7fcc633ce9..572e53cc8a3 100644 --- a/tests/integration/targets/iam_access_key/tasks/main.yml +++ b/tests/integration/targets/iam_access_key/tasks/main.yml @@ -2,9 +2,9 @@ - name: AWS AuthN details module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws @@ -548,9 +548,9 @@ - name: Test GetCallerIdentity - Key 2 aws_caller_info: - aws_access_key: "{{ create_key_2.access_key.access_key_id }}" - aws_secret_key: "{{ create_key_2.secret_access_key }}" - security_token: "{{ omit }}" + access_key: "{{ create_key_2.access_key.access_key_id }}" + secret_key: "{{ create_key_2.secret_access_key }}" + session_token: "{{ omit }}" register: caller_identity_2 - assert: @@ -560,9 +560,9 @@ - name: Test GetCallerIdentity - Key 1 (gone) aws_caller_info: - aws_access_key: "{{ create_key_1.access_key.access_key_id }}" - aws_secret_key: "{{ create_key_1.secret_access_key }}" - security_token: "{{ omit }}" + access_key: "{{ create_key_1.access_key.access_key_id }}" + secret_key: "{{ create_key_1.secret_access_key }}" + session_token: "{{ omit }}" register: caller_identity_1 ignore_errors: true @@ -573,9 +573,9 @@ - name: Test GetCallerIdentity - Key 3 (disabled) aws_caller_info: - aws_access_key: "{{ create_key_3.access_key.access_key_id }}" - aws_secret_key: "{{ create_key_3.secret_access_key }}" - security_token: "{{ omit }}" + access_key: "{{ create_key_3.access_key.access_key_id }}" + secret_key: "{{ create_key_3.secret_access_key }}" + session_token: "{{ omit }}" register: caller_identity_3 ignore_errors: true diff --git a/tests/integration/targets/iam_group/tasks/main.yml b/tests/integration/targets/iam_group/tasks/main.yml index 65b441827ca..a1240846cb8 100644 --- a/tests/integration/targets/iam_group/tasks/main.yml +++ b/tests/integration/targets/iam_group/tasks/main.yml @@ -2,9 +2,9 @@ - name: set up aws connection info module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/iam_managed_policy/tasks/main.yml b/tests/integration/targets/iam_managed_policy/tasks/main.yml index f17b7cad096..9aba195eee7 100644 --- a/tests/integration/targets/iam_managed_policy/tasks/main.yml +++ b/tests/integration/targets/iam_managed_policy/tasks/main.yml @@ -2,9 +2,9 @@ - name: "Run integration tests for IAM managed policy" module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/iam_password_policy/tasks/main.yaml b/tests/integration/targets/iam_password_policy/tasks/main.yaml index 7b773eac808..c673f74366b 100644 --- a/tests/integration/targets/iam_password_policy/tasks/main.yaml +++ b/tests/integration/targets/iam_password_policy/tasks/main.yaml @@ -1,8 +1,8 @@ - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/iam_role/tasks/main.yml b/tests/integration/targets/iam_role/tasks/main.yml index ae47ada1ad5..821a683eb53 100644 --- a/tests/integration/targets/iam_role/tasks/main.yml +++ b/tests/integration/targets/iam_role/tasks/main.yml @@ -23,9 +23,9 @@ - name: "Setup AWS connection info" module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" iam_role: assume_role_policy_document: '{{ lookup("file", "deny-assume.json") }}' diff --git a/tests/integration/targets/iam_saml_federation/tasks/main.yml b/tests/integration/targets/iam_saml_federation/tasks/main.yml index b061fc6012a..3098d4811b7 100644 --- a/tests/integration/targets/iam_saml_federation/tasks/main.yml +++ b/tests/integration/targets/iam_saml_federation/tasks/main.yml @@ -1,9 +1,9 @@ - module_defaults: group/aws: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + 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/iam_server_certificate/tasks/main.yml b/tests/integration/targets/iam_server_certificate/tasks/main.yml index 0cfab38c8c8..d50ebfe5292 100644 --- a/tests/integration/targets/iam_server_certificate/tasks/main.yml +++ b/tests/integration/targets/iam_server_certificate/tasks/main.yml @@ -11,9 +11,9 @@ # - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/inspector_target/tasks/main.yml b/tests/integration/targets/inspector_target/tasks/main.yml index 907e1ffdd2c..6c80a02f949 100644 --- a/tests/integration/targets/inspector_target/tasks/main.yml +++ b/tests/integration/targets/inspector_target/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/inventory_aws_mq/playbooks/populate_cache.yml b/tests/integration/targets/inventory_aws_mq/playbooks/populate_cache.yml index 634f5cf9800..dff6ede2f38 100644 --- a/tests/integration/targets/inventory_aws_mq/playbooks/populate_cache.yml +++ b/tests/integration/targets/inventory_aws_mq/playbooks/populate_cache.yml @@ -7,9 +7,9 @@ module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' collections: diff --git a/tests/integration/targets/inventory_aws_mq/playbooks/setup_instance.yml b/tests/integration/targets/inventory_aws_mq/playbooks/setup_instance.yml index f6cc63df316..fcea9cd8cf5 100644 --- a/tests/integration/targets/inventory_aws_mq/playbooks/setup_instance.yml +++ b/tests/integration/targets/inventory_aws_mq/playbooks/setup_instance.yml @@ -14,9 +14,9 @@ module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' collections: diff --git a/tests/integration/targets/inventory_aws_mq/templates/inventory.j2 b/tests/integration/targets/inventory_aws_mq/templates/inventory.j2 index 357fa8c943f..25fa80918d1 100644 --- a/tests/integration/targets/inventory_aws_mq/templates/inventory.j2 +++ b/tests/integration/targets/inventory_aws_mq/templates/inventory.j2 @@ -1,8 +1,8 @@ plugin: community.aws.aws_mq -aws_access_key_id: '{{ aws_access_key }}' -aws_secret_access_key: '{{ aws_secret_key }}' +access_key: '{{ aws_access_key }}' +secret_key: '{{ aws_secret_key }}' {% if security_token | default(false) %} -aws_security_token: '{{ security_token }}' +session_token: '{{ security_token }}' {% endif %} regions: - '{{ aws_region }}' diff --git a/tests/integration/targets/inventory_aws_mq/templates/inventory_with_cache.j2 b/tests/integration/targets/inventory_aws_mq/templates/inventory_with_cache.j2 index 6d514451116..10941a8d5d4 100644 --- a/tests/integration/targets/inventory_aws_mq/templates/inventory_with_cache.j2 +++ b/tests/integration/targets/inventory_aws_mq/templates/inventory_with_cache.j2 @@ -2,10 +2,10 @@ plugin: community.aws.aws_mq cache: True cache_plugin: jsonfile cache_connection: '{{ aws_inventory_cache_dir }}' -aws_access_key_id: '{{ aws_access_key }}' -aws_secret_access_key: '{{ aws_secret_key }}' +access_key: '{{ aws_access_key }}' +secret_key: '{{ aws_secret_key }}' {% if security_token | default(false) %} -aws_security_token: '{{ security_token }}' +session_token: '{{ security_token }}' {% endif %} regions: - '{{ aws_region }}' diff --git a/tests/integration/targets/inventory_aws_mq/templates/inventory_with_constructed.j2 b/tests/integration/targets/inventory_aws_mq/templates/inventory_with_constructed.j2 index 3381c0d1dfa..7b421ace480 100644 --- a/tests/integration/targets/inventory_aws_mq/templates/inventory_with_constructed.j2 +++ b/tests/integration/targets/inventory_aws_mq/templates/inventory_with_constructed.j2 @@ -1,8 +1,8 @@ plugin: community.aws.aws_mq -aws_access_key_id: '{{ aws_access_key }}' -aws_secret_access_key: '{{ aws_secret_key }}' +access_key: '{{ aws_access_key }}' +secret_key: '{{ aws_secret_key }}' {% if security_token | default(false) %} -aws_security_token: '{{ security_token }}' +session_token: '{{ security_token }}' {% endif %} regions: - '{{ aws_region }}' diff --git a/tests/integration/targets/inventory_aws_mq/templates/inventory_with_hostvars_prefix_suffix.j2 b/tests/integration/targets/inventory_aws_mq/templates/inventory_with_hostvars_prefix_suffix.j2 index 92e9e9418bb..13bc6ffa854 100644 --- a/tests/integration/targets/inventory_aws_mq/templates/inventory_with_hostvars_prefix_suffix.j2 +++ b/tests/integration/targets/inventory_aws_mq/templates/inventory_with_hostvars_prefix_suffix.j2 @@ -1,8 +1,8 @@ plugin: community.aws.aws_mq -aws_access_key_id: '{{ aws_access_key }}' -aws_secret_access_key: '{{ aws_secret_key }}' +access_key: '{{ aws_access_key }}' +secret_key: '{{ aws_secret_key }}' {% if security_token | default(false) %} -aws_security_token: '{{ security_token }}' +session_token: '{{ security_token }}' {% endif %} regions: - '{{ aws_region }}' diff --git a/tests/integration/targets/kinesis_stream/tasks/main.yml b/tests/integration/targets/kinesis_stream/tasks/main.yml index b6791fb06d8..d4e10850106 100644 --- a/tests/integration/targets/kinesis_stream/tasks/main.yml +++ b/tests/integration/targets/kinesis_stream/tasks/main.yml @@ -3,9 +3,9 @@ - name: 'Setup AWS Module Defaults' module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' kinesis_stream: # Number of shards is mandatory when state=present diff --git a/tests/integration/targets/lightsail/tasks/main.yml b/tests/integration/targets/lightsail/tasks/main.yml index eb6001add71..13c029e554c 100644 --- a/tests/integration/targets/lightsail/tasks/main.yml +++ b/tests/integration/targets/lightsail/tasks/main.yml @@ -2,10 +2,10 @@ - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + 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/lightsail_snapshot/tasks/main.yml b/tests/integration/targets/lightsail_snapshot/tasks/main.yml index 2152c895f0e..4b5eddc17eb 100644 --- a/tests/integration/targets/lightsail_snapshot/tasks/main.yml +++ b/tests/integration/targets/lightsail_snapshot/tasks/main.yml @@ -2,10 +2,10 @@ - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' block: @@ -26,7 +26,7 @@ region: "{{ aws_region }}" wait: yes register: result - + - assert: that: - result.changed == True diff --git a/tests/integration/targets/lightsail_static_ip/tasks/main.yml b/tests/integration/targets/lightsail_static_ip/tasks/main.yml index f8f327344db..e0b452f3e75 100644 --- a/tests/integration/targets/lightsail_static_ip/tasks/main.yml +++ b/tests/integration/targets/lightsail_static_ip/tasks/main.yml @@ -2,10 +2,10 @@ - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + 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/mq/tasks/main.yml b/tests/integration/targets/mq/tasks/main.yml index 59b772b44e0..2055700480b 100644 --- a/tests/integration/targets/mq/tasks/main.yml +++ b/tests/integration/targets/mq/tasks/main.yml @@ -2,9 +2,9 @@ - name: run amazon MQ tests module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" aws_region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/msk_cluster-auth/tasks/main.yml b/tests/integration/targets/msk_cluster-auth/tasks/main.yml index 5a6487607f8..db0464d56da 100644 --- a/tests/integration/targets/msk_cluster-auth/tasks/main.yml +++ b/tests/integration/targets/msk_cluster-auth/tasks/main.yml @@ -2,9 +2,9 @@ - name: aws_msk_cluster integration tests module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/msk_cluster/tasks/main.yml b/tests/integration/targets/msk_cluster/tasks/main.yml index a3049dad0b4..c6de8e4d6ac 100644 --- a/tests/integration/targets/msk_cluster/tasks/main.yml +++ b/tests/integration/targets/msk_cluster/tasks/main.yml @@ -2,9 +2,9 @@ - name: aws_msk_cluster integration tests module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/msk_config/tasks/main.yml b/tests/integration/targets/msk_config/tasks/main.yml index cef9e1dfc90..eace6614f2b 100644 --- a/tests/integration/targets/msk_config/tasks/main.yml +++ b/tests/integration/targets/msk_config/tasks/main.yml @@ -2,9 +2,9 @@ - name: tests for community.aws.aws_msk_config module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/networkfirewall/tasks/main.yml b/tests/integration/targets/networkfirewall/tasks/main.yml index 6a77d4f9355..5a60654d89c 100644 --- a/tests/integration/targets/networkfirewall/tasks/main.yml +++ b/tests/integration/targets/networkfirewall/tasks/main.yml @@ -5,9 +5,9 @@ - community.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/networkfirewall_policy/tasks/main.yml b/tests/integration/targets/networkfirewall_policy/tasks/main.yml index 7a57569480e..14c3d118203 100644 --- a/tests/integration/targets/networkfirewall_policy/tasks/main.yml +++ b/tests/integration/targets/networkfirewall_policy/tasks/main.yml @@ -1,10 +1,10 @@ --- - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' collections: - amazon.aws - community.aws diff --git a/tests/integration/targets/networkfirewall_rule_group/tasks/main.yml b/tests/integration/targets/networkfirewall_rule_group/tasks/main.yml index b6734d932a6..46823c3c884 100644 --- a/tests/integration/targets/networkfirewall_rule_group/tasks/main.yml +++ b/tests/integration/targets/networkfirewall_rule_group/tasks/main.yml @@ -1,10 +1,10 @@ --- - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' collections: - amazon.aws - community.aws diff --git a/tests/integration/targets/opensearch/tasks/main.yml b/tests/integration/targets/opensearch/tasks/main.yml index 21e6486a720..e3c33d23887 100644 --- a/tests/integration/targets/opensearch/tasks/main.yml +++ b/tests/integration/targets/opensearch/tasks/main.yml @@ -4,9 +4,9 @@ module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" route53: # Route53 is explicitly a global service diff --git a/tests/integration/targets/redshift/tasks/main.yml b/tests/integration/targets/redshift/tasks/main.yml index f79991d4eb9..91ca39f4d78 100644 --- a/tests/integration/targets/redshift/tasks/main.yml +++ b/tests/integration/targets/redshift/tasks/main.yml @@ -8,9 +8,9 @@ - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + 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/redshift_subnet_group/tasks/main.yml b/tests/integration/targets/redshift_subnet_group/tasks/main.yml index e15ee9b9313..0df7d98d0fa 100644 --- a/tests/integration/targets/redshift_subnet_group/tasks/main.yml +++ b/tests/integration/targets/redshift_subnet_group/tasks/main.yml @@ -9,9 +9,9 @@ # - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/s3_bucket_info/tasks/main.yml b/tests/integration/targets/s3_bucket_info/tasks/main.yml index 47d24cd0e3b..043ea157f89 100644 --- a/tests/integration/targets/s3_bucket_info/tasks/main.yml +++ b/tests/integration/targets/s3_bucket_info/tasks/main.yml @@ -2,9 +2,9 @@ - name: Test community.aws.aws_s3_bucket_info module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: - name: Create a simple s3_bucket diff --git a/tests/integration/targets/s3_bucket_notification/tasks/main.yml b/tests/integration/targets/s3_bucket_notification/tasks/main.yml index ea72010654f..ce81efc8c86 100644 --- a/tests/integration/targets/s3_bucket_notification/tasks/main.yml +++ b/tests/integration/targets/s3_bucket_notification/tasks/main.yml @@ -4,9 +4,9 @@ - community.general module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: - include_tasks: test_sns_sqs_notifications.yml diff --git a/tests/integration/targets/s3_lifecycle/tasks/main.yml b/tests/integration/targets/s3_lifecycle/tasks/main.yml index 75227044a41..d9f169561af 100644 --- a/tests/integration/targets/s3_lifecycle/tasks/main.yml +++ b/tests/integration/targets/s3_lifecycle/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' s3_lifecycle: wait: true diff --git a/tests/integration/targets/s3_logging/tasks/main.yml b/tests/integration/targets/s3_logging/tasks/main.yml index f6c9a1710f1..e9a7b220b52 100644 --- a/tests/integration/targets/s3_logging/tasks/main.yml +++ b/tests/integration/targets/s3_logging/tasks/main.yml @@ -11,9 +11,9 @@ # - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' collections: - amazon.aws diff --git a/tests/integration/targets/s3_metrics_configuration/tasks/main.yml b/tests/integration/targets/s3_metrics_configuration/tasks/main.yml index ba5cce9e648..9e9f1133aaf 100644 --- a/tests/integration/targets/s3_metrics_configuration/tasks/main.yml +++ b/tests/integration/targets/s3_metrics_configuration/tasks/main.yml @@ -6,10 +6,10 @@ # - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key | default(omit) }}' - aws_secret_key: '{{ aws_secret_key | default(omit) }}' - security_token: '{{ security_token | default(omit) }}' - region: '{{ aws_region | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' + region: '{{ aws_region }}' collections: - amazon.aws block: diff --git a/tests/integration/targets/s3_metrics_configuration/tasks/s3_metrics_info.yml b/tests/integration/targets/s3_metrics_configuration/tasks/s3_metrics_info.yml index cca7cad0503..fdbc8cbfc92 100644 --- a/tests/integration/targets/s3_metrics_configuration/tasks/s3_metrics_info.yml +++ b/tests/integration/targets/s3_metrics_configuration/tasks/s3_metrics_info.yml @@ -6,10 +6,10 @@ aws s3api list-bucket-metrics-configurations --bucket {{ test_bucket }} environment: - AWS_ACCESS_KEY_ID: "{{ aws_access_key | default(omit) }}" - AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key | default(omit) }}" + AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" + AWS_SECRET_ACCESS_KEY: "{{ aws_secret_key }}" AWS_SESSION_TOKEN: "{{ security_token | default(omit) }}" - AWS_DEFAULT_REGION: "{{ aws_region | default(omit) }}" + AWS_DEFAULT_REGION: "{{ aws_region }}" register: list_comand_result - set_fact: diff --git a/tests/integration/targets/s3_sync/tasks/main.yml b/tests/integration/targets/s3_sync/tasks/main.yml index 08496cd74a6..eb8810ee580 100644 --- a/tests/integration/targets/s3_sync/tasks/main.yml +++ b/tests/integration/targets/s3_sync/tasks/main.yml @@ -5,9 +5,9 @@ - community.general module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/secretsmanager_secret/tasks/basic.yml b/tests/integration/targets/secretsmanager_secret/tasks/basic.yml index 5d1fb071e04..9b273de9fa9 100644 --- a/tests/integration/targets/secretsmanager_secret/tasks/basic.yml +++ b/tests/integration/targets/secretsmanager_secret/tasks/basic.yml @@ -23,9 +23,9 @@ # As a lookup plugin we won't have access to module_defaults connection_args: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - aws_security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" no_log: True - vars: diff --git a/tests/integration/targets/secretsmanager_secret/tasks/main.yaml b/tests/integration/targets/secretsmanager_secret/tasks/main.yaml index 41fbedd9d5e..9011071f83d 100644 --- a/tests/integration/targets/secretsmanager_secret/tasks/main.yaml +++ b/tests/integration/targets/secretsmanager_secret/tasks/main.yaml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml b/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml index 5a1d146e51a..273a5ae04fe 100644 --- a/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml +++ b/tests/integration/targets/secretsmanager_secret/tasks/rotation.yml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/ses_identity/tasks/assert_defaults.yaml b/tests/integration/targets/ses_identity/tasks/assert_defaults.yaml index 0f74d2f05db..266822633e4 100644 --- a/tests/integration/targets/ses_identity/tasks/assert_defaults.yaml +++ b/tests/integration/targets/ses_identity/tasks/assert_defaults.yaml @@ -5,8 +5,8 @@ - name: assert returned identity_arn assert: that: - - "result.identity_arn|regex_search('^arn:aws:ses:' + ec2_region + ':[0-9]*:identity/' + identity + '$')" - msg: "'{{ result.identity_arn}}' doesn't match regex '^arn:aws:ses:{{ ec2_region }}:[0-9]*:identity/{{ identity }}'" + - "result.identity_arn|regex_search('^arn:aws:ses:' + aws_region + ':[0-9]*:identity/' + identity + '$')" + msg: "'{{ result.identity_arn}}' doesn't match regex '^arn:aws:ses:{{ aws_region }}:[0-9]*:identity/{{ identity }}'" - name: assert verification_attributes.verification_status == 'Pending' assert: that: diff --git a/tests/integration/targets/ses_identity/tasks/main.yaml b/tests/integration/targets/ses_identity/tasks/main.yaml index 19f7e23ab85..c7554e1a693 100644 --- a/tests/integration/targets/ses_identity/tasks/main.yaml +++ b/tests/integration/targets/ses_identity/tasks/main.yaml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ses_identity_policy/tasks/main.yaml b/tests/integration/targets/ses_identity_policy/tasks/main.yaml index 5aa3d867ba9..798dcf8c644 100644 --- a/tests/integration/targets/ses_identity_policy/tasks/main.yaml +++ b/tests/integration/targets/ses_identity_policy/tasks/main.yaml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/ses_rule_set/tasks/cleanup-lock.yaml b/tests/integration/targets/ses_rule_set/tasks/cleanup-lock.yaml index 155bf472e4e..941e0148a98 100644 --- a/tests/integration/targets/ses_rule_set/tasks/cleanup-lock.yaml +++ b/tests/integration/targets/ses_rule_set/tasks/cleanup-lock.yaml @@ -9,7 +9,7 @@ - cloudwatchlogs_log_group: log_group_name: "{{ lock_attempt_log_group_name }}" state: absent - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" diff --git a/tests/integration/targets/ses_rule_set/tasks/main.yaml b/tests/integration/targets/ses_rule_set/tasks/main.yaml index 4902b5c60f0..99938b77470 100644 --- a/tests/integration/targets/ses_rule_set/tasks/main.yaml +++ b/tests/integration/targets/ses_rule_set/tasks/main.yaml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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_connection_aws_ssm/tasks/cleanup.yml b/tests/integration/targets/setup_connection_aws_ssm/tasks/cleanup.yml index 15b833213ba..413dc381e57 100644 --- a/tests/integration/targets/setup_connection_aws_ssm/tasks/cleanup.yml +++ b/tests/integration/targets/setup_connection_aws_ssm/tasks/cleanup.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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_connection_aws_ssm/tasks/connection_args.yml b/tests/integration/targets/setup_connection_aws_ssm/tasks/connection_args.yml index effe5d66cd7..8d5c4b7143b 100644 --- a/tests/integration/targets/setup_connection_aws_ssm/tasks/connection_args.yml +++ b/tests/integration/targets/setup_connection_aws_ssm/tasks/connection_args.yml @@ -3,9 +3,9 @@ # As a lookup plugin we don't have access to module_defaults connection_args: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - aws_session_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" connection_env: AWS_DEFAULT_REGION: "{{ aws_region }}" AWS_ACCESS_KEY_ID: "{{ aws_access_key }}" diff --git a/tests/integration/targets/setup_connection_aws_ssm/tasks/main.yml b/tests/integration/targets/setup_connection_aws_ssm/tasks/main.yml index 830bd5fcc8a..6c29c415438 100644 --- a/tests/integration/targets/setup_connection_aws_ssm/tasks/main.yml +++ b/tests/integration/targets/setup_connection_aws_ssm/tasks/main.yml @@ -5,9 +5,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/tasks/main.yml b/tests/integration/targets/setup_ec2_facts/tasks/main.yml index f41791073a3..56a4e1db05f 100644 --- a/tests/integration/targets/setup_ec2_facts/tasks/main.yml +++ b/tests/integration/targets/setup_ec2_facts/tasks/main.yml @@ -10,9 +10,9 @@ # - module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' run_once: True diff --git a/tests/integration/targets/sns/tasks/main.yml b/tests/integration/targets/sns/tasks/main.yml index 42ef9b1904d..99be6b218cc 100644 --- a/tests/integration/targets/sns/tasks/main.yml +++ b/tests/integration/targets/sns/tasks/main.yml @@ -1,9 +1,9 @@ - name: set up AWS connection info module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' collections: - amazon.aws diff --git a/tests/integration/targets/sns_topic/tasks/main.yml b/tests/integration/targets/sns_topic/tasks/main.yml index d5b389e4d5f..c05ad3b5373 100644 --- a/tests/integration/targets/sns_topic/tasks/main.yml +++ b/tests/integration/targets/sns_topic/tasks/main.yml @@ -1,8 +1,8 @@ - module_defaults: group/aws: - aws_secret_key: '{{ aws_secret_key }}' - aws_access_key: '{{ aws_access_key }}' - security_token: '{{ security_token|default(omit) }}' + secret_key: '{{ aws_secret_key }}' + access_key: '{{ aws_access_key }}' + session_token: '{{ security_token|default(omit) }}' region: '{{ aws_region }}' block: diff --git a/tests/integration/targets/sqs_queue/tasks/main.yml b/tests/integration/targets/sqs_queue/tasks/main.yml index bcba06c8f30..d5a9dd60370 100644 --- a/tests/integration/targets/sqs_queue/tasks/main.yml +++ b/tests/integration/targets/sqs_queue/tasks/main.yml @@ -3,9 +3,9 @@ module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + 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/ssm_parameter/tasks/main.yml b/tests/integration/targets/ssm_parameter/tasks/main.yml index ac461392a96..02283bb980c 100644 --- a/tests/integration/targets/ssm_parameter/tasks/main.yml +++ b/tests/integration/targets/ssm_parameter/tasks/main.yml @@ -3,9 +3,9 @@ # As a lookup plugin we don't have access to module_defaults connection_args: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - aws_security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" no_log: True - name: 'aws_ssm lookup plugin integration tests' @@ -13,9 +13,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + access_key: '{{ aws_access_key }}' + secret_key: '{{ aws_secret_key }}' + session_token: '{{ security_token | default(omit) }}' region: '{{ aws_region }}' vars: simple_name: '/{{ ssm_key_prefix }}/Simple' diff --git a/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml b/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml index 8c4bbec716d..e88430259a9 100644 --- a/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml +++ b/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml @@ -3,9 +3,9 @@ - name: Integration test for AWS Step Function state machine module module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" collections: - amazon.aws diff --git a/tests/integration/targets/sts_assume_role/tasks/main.yml b/tests/integration/targets/sts_assume_role/tasks/main.yml index 42ef51c04d0..23e0dba7843 100644 --- a/tests/integration/targets/sts_assume_role/tasks/main.yml +++ b/tests/integration/targets/sts_assume_role/tasks/main.yml @@ -4,9 +4,9 @@ - module_defaults: group/aws: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" collections: - amazon.aws block: @@ -39,9 +39,9 @@ # ============================================================ - name: test with no parameters sts_assume_role: - aws_access_key: '{{ omit }}' - aws_secret_key: '{{ omit }}' - security_token: '{{ omit }}' + access_key: '{{ omit }}' + secret_key: '{{ omit }}' + session_token: '{{ omit }}' register: result ignore_errors: true @@ -248,9 +248,9 @@ # ============================================================ - name: test that assumed credentials have IAM read-only access iam_role: - aws_access_key: "{{ assumed_role.sts_creds.access_key }}" - aws_secret_key: "{{ assumed_role.sts_creds.secret_key }}" - security_token: "{{ assumed_role.sts_creds.session_token }}" + access_key: "{{ assumed_role.sts_creds.access_key }}" + secret_key: "{{ assumed_role.sts_creds.secret_key }}" + session_token: "{{ assumed_role.sts_creds.session_token }}" name: "{{ iam_role_name }}" assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" create_instance_profile: False @@ -267,9 +267,9 @@ # ============================================================ - name: test assumed role with unprivileged action iam_role: - aws_access_key: "{{ assumed_role.sts_creds.access_key }}" - aws_secret_key: "{{ assumed_role.sts_creds.secret_key }}" - security_token: "{{ assumed_role.sts_creds.session_token }}" + access_key: "{{ assumed_role.sts_creds.access_key }}" + secret_key: "{{ assumed_role.sts_creds.secret_key }}" + session_token: "{{ assumed_role.sts_creds.session_token }}" name: "{{ iam_role_name }}-new" assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" state: present diff --git a/tests/integration/targets/sts_session_token/tasks/main.yml b/tests/integration/targets/sts_session_token/tasks/main.yml index 6231119ecd5..c814cfd5f16 100644 --- a/tests/integration/targets/sts_session_token/tasks/main.yml +++ b/tests/integration/targets/sts_session_token/tasks/main.yml @@ -3,9 +3,9 @@ - module_defaults: group/aws: region: "{{ aws_region }}" - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" collections: - amazon.aws block: @@ -54,9 +54,9 @@ - name: Get ARN of user when running with generated token aws_caller_info: - aws_access_key: "{{ token_details.sts_creds.access_key }}" - aws_secret_key: "{{ token_details.sts_creds.secret_key }}" - security_token: "{{ token_details.sts_creds.session_token }}" + access_key: "{{ token_details.sts_creds.access_key }}" + secret_key: "{{ token_details.sts_creds.secret_key }}" + session_token: "{{ token_details.sts_creds.session_token }}" register: token_aws_caller_info - assert: diff --git a/tests/integration/targets/waf_web_acl/tasks/main.yml b/tests/integration/targets/waf_web_acl/tasks/main.yml index c176e7defe0..9884d2ee3e5 100644 --- a/tests/integration/targets/waf_web_acl/tasks/main.yml +++ b/tests/integration/targets/waf_web_acl/tasks/main.yml @@ -4,9 +4,9 @@ - amazon.aws module_defaults: group/aws: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token | default(omit) }}' + 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/wafv2/tasks/main.yml b/tests/integration/targets/wafv2/tasks/main.yml index 547c4c15105..5ce694e4d37 100644 --- a/tests/integration/targets/wafv2/tasks/main.yml +++ b/tests/integration/targets/wafv2/tasks/main.yml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: @@ -103,10 +103,6 @@ ######################### - name: destroy ALB elb_application_lb: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' name: '{{ alb_name }}' state: absent wait: true @@ -115,10 +111,6 @@ - name: destroy target group if it was created elb_target_group: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' name: '{{ tg_name }}' protocol: http port: 80 @@ -135,10 +127,6 @@ - name: destroy sec group ec2_group: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' name: '{{ sec_group.group_name }}' description: security group for Ansible ALB integration tests state: absent @@ -151,10 +139,6 @@ - name: remove route table ec2_vpc_route_table: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' vpc_id: '{{ vpc.vpc.id }}' route_table_id: '{{ route_table.route_table.route_table_id }}' lookup: id @@ -167,10 +151,6 @@ - name: destroy subnets ec2_vpc_subnet: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' cidr: '{{ item.cidr }}' vpc_id: '{{ vpc.vpc.id }}' state: absent @@ -187,10 +167,6 @@ - name: destroy internet gateway ec2_vpc_igw: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' vpc_id: '{{ vpc.vpc.id }}' tags: Name: '{{ resource_prefix }}' @@ -203,10 +179,6 @@ - name: destroy VPC ec2_vpc_net: - aws_access_key: '{{ aws_access_key }}' - aws_secret_key: '{{ aws_secret_key }}' - security_token: '{{ security_token }}' - region: '{{ aws_region }}' cidr_block: 10.228.228.0/22 name: '{{ resource_prefix }}_vpc' state: absent diff --git a/tests/integration/targets/wafv2_ip_set/tasks/main.yml b/tests/integration/targets/wafv2_ip_set/tasks/main.yml index f7afc5b93cb..6fcf4438c80 100644 --- a/tests/integration/targets/wafv2_ip_set/tasks/main.yml +++ b/tests/integration/targets/wafv2_ip_set/tasks/main.yml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: - name: check_mode create ip set diff --git a/tests/integration/targets/wafv2_rule_group/tasks/main.yml b/tests/integration/targets/wafv2_rule_group/tasks/main.yml index e761b064780..b2a2fcd8c00 100644 --- a/tests/integration/targets/wafv2_rule_group/tasks/main.yml +++ b/tests/integration/targets/wafv2_rule_group/tasks/main.yml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + 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/wafv2_web_acl/tasks/main.yml b/tests/integration/targets/wafv2_web_acl/tasks/main.yml index 9d44e2b7795..64544fd50b8 100644 --- a/tests/integration/targets/wafv2_web_acl/tasks/main.yml +++ b/tests/integration/targets/wafv2_web_acl/tasks/main.yml @@ -1,9 +1,9 @@ --- - module_defaults: group/aws: - aws_access_key: "{{ aws_access_key }}" - aws_secret_key: "{{ aws_secret_key }}" - security_token: "{{ security_token | default(omit) }}" + access_key: "{{ aws_access_key }}" + secret_key: "{{ aws_secret_key }}" + session_token: "{{ security_token | default(omit) }}" region: "{{ aws_region }}" block: