diff --git a/tests/integration/targets/api_gateway_domain/tasks/main.yml b/tests/integration/targets/api_gateway_domain/tasks/main.yml index 24f391df37c..f3c7407937e 100644 --- a/tests/integration/targets/api_gateway_domain/tasks/main.yml +++ b/tests/integration/targets/api_gateway_domain/tasks/main.yml @@ -39,7 +39,7 @@ - assert: that: - create_result.changed == True - - create_result.response.domain.domain_name == "{{ api_gateway_domain_name }}" + - create_result.response.domain.domain_name == api_gateway_domain_name - create_result.response.domain.distribution_domain_name is defined - create_result.response.domain.distribution_hosted_zone_id is defined - create_result.response.path_mappings is defined @@ -59,7 +59,7 @@ that: - repeat_result.changed == False - repeat_result.failed == False - - repeat_result.response.domain_name == "{{ api_gateway_domain_name }}" + - repeat_result.response.domain_name == api_gateway_domain_name - name: Update Test - API gateway custom domain setup, change settings api_gateway_domain: @@ -75,7 +75,7 @@ - assert: that: - update_result.changed == True - - update_result.response.domain.domain_name == "{{ api_gateway_domain_name }}" + - update_result.response.domain.domain_name == api_gateway_domain_name - update_result.response.domain.security_policy == 'TLS_1_2' - update_result.response.domain.endpoint_configuration.types.0 == 'REGIONAL' - update_result.response.path_mappings.0.base_path = '/v1' diff --git a/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml b/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml index f19b7c3c24a..5b754d47d69 100644 --- a/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml +++ b/tests/integration/targets/autoscaling_instance_refresh/tasks/main.yml @@ -107,7 +107,7 @@ - assert: that: - - "'An error occurred (ActiveInstanceRefreshNotFound) when calling the CancelInstanceRefresh operation: No in progress or pending Instance Refresh found for Auto Scaling group {{ resource_prefix }}-asg' in result.msg" + - "'An error occurred (ActiveInstanceRefreshNotFound) when calling the CancelInstanceRefresh operation: No in progress or pending Instance Refresh found for Auto Scaling group ' ~ resource_prefix ~ '-asg' in result.msg" - name: test starting a refresh with a valid ASG name - check_mode autoscaling_instance_refresh: @@ -323,7 +323,7 @@ - assert: that: - - "{{ output.instance_refreshes|length }} == 0" + - output.instance_refreshes | length == 0 - name: test using a real refresh ID autoscaling_instance_refresh_info: @@ -334,7 +334,7 @@ - assert: that: - - "{{ output.instance_refreshes |length }} == 1" + - output.instance_refreshes | length == 1 - name: test getting info for an ASG name which doesn't exist autoscaling_instance_refresh_info: @@ -354,7 +354,7 @@ - assert: that: - - "{{ output.instance_refreshes|length }} == 7" + - output.instance_refreshes | length == 7 - name: assert that valid message with fake-token is returned autoscaling_instance_refresh_info: @@ -376,7 +376,7 @@ - assert: that: - - "{{ output.instance_refreshes|length }} < 2" + - output.instance_refreshes | length < 2 - name: assert that valid message with real-token is returned autoscaling_instance_refresh_info: @@ -387,7 +387,7 @@ - assert: that: - - "{{ output.instance_refreshes|length }} == 7" + - output.instance_refreshes | length == 7 - name: test using both real nextToken and max_records=1 autoscaling_instance_refresh_info: @@ -399,7 +399,7 @@ - assert: that: - - "{{ output.instance_refreshes|length }} == 1" + - output.instance_refreshes | length == 1 always: diff --git a/tests/integration/targets/autoscaling_policy/tasks/main.yml b/tests/integration/targets/autoscaling_policy/tasks/main.yml index e3e42041f18..684522d641a 100644 --- a/tests/integration/targets/autoscaling_policy/tasks/main.yml +++ b/tests/integration/targets/autoscaling_policy/tasks/main.yml @@ -46,7 +46,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.policy_name == resource_prefix ~ '_simplescaling_policy' - result.changed - name: Update Simple Scaling policy using explicit defaults @@ -61,7 +61,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.policy_name == resource_prefix ~ '_simplescaling_policy' - not result.changed - name: min_adjustment_step is ignored with ChangeInCapacity @@ -77,7 +77,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.policy_name == resource_prefix ~ '_simplescaling_policy' - not result.changed - result.adjustment_type == "ChangeInCapacity" @@ -94,7 +94,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_simplescaling_policy" + - result.policy_name == resource_prefix ~ '_simplescaling_policy' - result.changed - result.adjustment_type == "PercentChangeInCapacity" @@ -126,7 +126,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_stepscaling_policy" + - result.policy_name == resource_prefix ~ '_stepscaling_policy' - result.changed - name: Add another step @@ -149,7 +149,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_stepscaling_policy" + - result.policy_name == resource_prefix ~ '_stepscaling_policy' - result.changed - result.adjustment_type == "PercentChangeInCapacity" @@ -189,7 +189,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_targettracking_predefined_policy" + - result.policy_name == resource_prefix ~ '_targettracking_predefined_policy' - result.changed - result is successful @@ -206,7 +206,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_targettracking_predefined_policy" + - result.policy_name == resource_prefix ~ '_targettracking_predefined_policy' - result is not changed # # It would be good to also test this but we would need an Target group and an ALB @@ -263,7 +263,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_targettracking_custom_policy" + - result.policy_name == resource_prefix ~ '_targettracking_custom_policy' - result.changed - result is successful @@ -285,7 +285,7 @@ - assert: that: - - result.policy_name == "{{ resource_prefix }}_targettracking_custom_policy" + - result.policy_name == resource_prefix ~ '_targettracking_custom_policy' - result is not changed always: diff --git a/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml b/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml index 6de1d2dff7a..4c0e97220af 100644 --- a/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml +++ b/tests/integration/targets/autoscaling_scheduled_action/tasks/main.yml @@ -101,7 +101,7 @@ that: - scheduled_action is successful - scheduled_action is changed - - scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test" + - scheduled_action.scheduled_action_name == resource_prefix ~ '-test' - scheduled_action.desired_capacity == 2 - name: Create basic scheduled_action - idempotent @@ -155,7 +155,7 @@ that: - scheduled_action is successful - scheduled_action is changed - - scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test" + - scheduled_action.scheduled_action_name == resource_prefix ~ '-test' - scheduled_action.desired_capacity == 3 - scheduled_action.min_size == 3 @@ -217,7 +217,7 @@ that: - advanced_scheduled_action is successful - advanced_scheduled_action is changed - - advanced_scheduled_action.scheduled_action_name == "{{ resource_prefix }}-test1" + - advanced_scheduled_action.scheduled_action_name == resource_prefix ~ '-test1' - advanced_scheduled_action.desired_capacity == 2 - advanced_scheduled_action.min_size == 2 - advanced_scheduled_action.max_size == 5 diff --git a/tests/integration/targets/cloudfront_distribution/tasks/main.yml b/tests/integration/targets/cloudfront_distribution/tasks/main.yml index c61684b7ce1..7a1fa91af81 100644 --- a/tests/integration/targets/cloudfront_distribution/tasks/main.yml +++ b/tests/integration/targets/cloudfront_distribution/tasks/main.yml @@ -168,7 +168,7 @@ that: - update_origin_origin_shield.changed - update_origin_origin_shield.origins['items'][0].origin_shield.enabled - - update_origin_origin_shield.origins['items'][0].origin_shield.origin_shield_region == '{{ aws_region }}' + - update_origin_origin_shield.origins['items'][0].origin_shield.origin_shield_region == aws_region # TODO: fix module idempotency issue # - name: enable origin Origin Shield again to test idempotency 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 cf48e89c4ba..5bab44f9fb9 100644 --- a/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml +++ b/tests/integration/targets/cloudfront_reponse_headers_policy/task/main.yml @@ -24,7 +24,7 @@ that: - create_result is changed - create_result is not failed - - create_result.response_headers_policy.response_headers_policy_config.name == "{{ resource_prefix }}-my-header-policy" + - create_result.response_headers_policy.response_headers_policy_config.name == resource_prefix ~ '-my-header-policy' - name: Rerun same task to ensure idempotence cloudfront_response_headers_policy: diff --git a/tests/integration/targets/codecommit_repository/tasks/main.yml b/tests/integration/targets/codecommit_repository/tasks/main.yml index 20c09fd8b6d..62dd1653bc9 100644 --- a/tests/integration/targets/codecommit_repository/tasks/main.yml +++ b/tests/integration/targets/codecommit_repository/tasks/main.yml @@ -27,7 +27,7 @@ - assert: that: - output is changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - output.repository_metadata.repository_description == 'original comment' - name: No-op update to repository @@ -39,7 +39,7 @@ - assert: that: - output is not changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - output.repository_metadata.repository_description == 'original comment' - name: Update repository description (CHECK MODE) @@ -52,7 +52,7 @@ - assert: that: - output is changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - output.repository_metadata.repository_description == 'original comment' - name: Update repository description @@ -64,7 +64,7 @@ - assert: that: - output is changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - output.repository_metadata.repository_description == 'new comment' # ============================================================ @@ -104,7 +104,7 @@ - assert: that: - output is changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - name: No-op update to repository without description codecommit_repository: @@ -114,7 +114,7 @@ - assert: that: - output is not changed - - output.repository_metadata.repository_name == '{{ resource_prefix }}_repo' + - output.repository_metadata.repository_name == resource_prefix ~ '_repo' - name: Delete a repository without description codecommit_repository: diff --git a/tests/integration/targets/codepipeline/tasks/main.yml b/tests/integration/targets/codepipeline/tasks/main.yml index 4e6e4368315..57353ed8a58 100644 --- a/tests/integration/targets/codepipeline/tasks/main.yml +++ b/tests/integration/targets/codepipeline/tasks/main.yml @@ -66,7 +66,7 @@ - assert: that: - output.changed == True - - output.pipeline.name == "{{ codepipeline_name }}" + - output.pipeline.name == codepipeline_name - output.pipeline.stages|length > 1 - name: idempotence check rerunning same CodePipeline task diff --git a/tests/integration/targets/connection/test_assume.yml b/tests/integration/targets/connection/test_assume.yml index e8c6aab0a09..f979ef2d432 100644 --- a/tests/integration/targets/connection/test_assume.yml +++ b/tests/integration/targets/connection/test_assume.yml @@ -13,4 +13,4 @@ - assert: that: - - id_cmd.stdout == '{{ user_name }}' + - id_cmd.stdout == user_name diff --git a/tests/integration/targets/ec2_placement_group/tasks/main.yml b/tests/integration/targets/ec2_placement_group/tasks/main.yml index 4f42a9df28d..10695571ebf 100644 --- a/tests/integration/targets/ec2_placement_group/tasks/main.yml +++ b/tests/integration/targets/ec2_placement_group/tasks/main.yml @@ -25,7 +25,7 @@ - assert: that: - pg_1_create_check_mode is changed - - pg_1_create_check_mode.placement_group.name == '{{ resource_prefix }}-pg1' + - pg_1_create_check_mode.placement_group.name == resource_prefix ~ '-pg1' - pg_1_create_check_mode.placement_group.state == "DryRun" - '"ec2:CreatePlacementGroup" in pg_1_create_check_mode.resource_actions' @@ -41,7 +41,7 @@ - assert: that: - pg_1_create is changed - - pg_1_create.placement_group.name == '{{ resource_prefix }}-pg1' + - pg_1_create.placement_group.name == resource_prefix ~ '-pg1' - pg_1_create.placement_group.state == "available" - '"ec2:CreatePlacementGroup" in pg_1_create.resource_actions' @@ -54,7 +54,7 @@ - assert: that: - pg_1_info_result is not changed - - pg_1_info_result.placement_groups[0].name == '{{ resource_prefix }}-pg1' + - pg_1_info_result.placement_groups[0].name == resource_prefix ~ '-pg1' - pg_1_info_result.placement_groups[0].state == "available" - pg_1_info_result.placement_groups[0].strategy == "cluster" - '"ec2:DescribePlacementGroups" in pg_1_info_result.resource_actions' @@ -68,7 +68,7 @@ - assert: that: - pg_1_create is not changed - - pg_1_create.placement_group.name == '{{ resource_prefix }}-pg1' + - pg_1_create.placement_group.name == resource_prefix ~ '-pg1' - pg_1_create.placement_group.state == "available" - '"ec2:CreatePlacementGroup" not in pg_1_create.resource_actions' @@ -82,7 +82,7 @@ - assert: that: - pg_1_create_check_mode_idem is not changed - - pg_1_create_check_mode_idem.placement_group.name == '{{ resource_prefix }}-pg1' + - pg_1_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg1' - pg_1_create_check_mode_idem.placement_group.state == "available" - '"ec2:CreatePlacementGroup" not in pg_1_create_check_mode_idem.resource_actions' @@ -97,7 +97,7 @@ - assert: that: - pg_2_create_check_mode is changed - - pg_2_create_check_mode.placement_group.name == '{{ resource_prefix }}-pg2' + - pg_2_create_check_mode.placement_group.name == resource_prefix ~ '-pg2' - pg_2_create_check_mode.placement_group.state == "DryRun" - '"ec2:CreatePlacementGroup" in pg_2_create_check_mode.resource_actions' @@ -111,7 +111,7 @@ - assert: that: - pg_2_create is changed - - pg_2_create.placement_group.name == '{{ resource_prefix }}-pg2' + - pg_2_create.placement_group.name == resource_prefix ~ '-pg2' - pg_2_create.placement_group.state == "available" - '"ec2:CreatePlacementGroup" in pg_2_create.resource_actions' @@ -127,7 +127,7 @@ - assert: that: - pg_2_info_result is not changed - - pg_2_info_result.placement_groups[0].name == '{{ resource_prefix }}-pg2' + - pg_2_info_result.placement_groups[0].name == resource_prefix ~ '-pg2' - pg_2_info_result.placement_groups[0].state == "available" - pg_2_info_result.placement_groups[0].strategy == "spread" - '"ec2:DescribePlacementGroups" in pg_2_info_result.resource_actions' @@ -142,7 +142,7 @@ - assert: that: - pg_2_create is not changed - - pg_2_create.placement_group.name == '{{ resource_prefix }}-pg2' + - pg_2_create.placement_group.name == resource_prefix ~ '-pg2' - pg_2_create.placement_group.state == "available" - '"ec2:CreatePlacementGroup" not in pg_2_create.resource_actions' @@ -157,7 +157,7 @@ - assert: that: - pg_2_create_check_mode_idem is not changed - - pg_2_create_check_mode_idem.placement_group.name == '{{ resource_prefix }}-pg2' + - pg_2_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg2' - pg_2_create_check_mode_idem.placement_group.state == "available" - '"ec2:CreatePlacementGroup" not in pg_2_create_check_mode_idem.resource_actions' @@ -173,7 +173,7 @@ - assert: that: - pg_3_create_check_mode is changed - - pg_3_create_check_mode.placement_group.name == '{{ resource_prefix }}-pg3' + - pg_3_create_check_mode.placement_group.name == resource_prefix ~ '-pg3' - pg_3_create_check_mode.placement_group.state == "DryRun" - '"ec2:CreatePlacementGroup" in pg_3_create_check_mode.resource_actions' @@ -188,7 +188,7 @@ - assert: that: - pg_3_create is changed - - pg_3_create.placement_group.name == '{{ resource_prefix }}-pg3' + - pg_3_create.placement_group.name == resource_prefix ~ '-pg3' - pg_3_create.placement_group.state == "available" - '"ec2:CreatePlacementGroup" in pg_3_create.resource_actions' @@ -205,7 +205,7 @@ - assert: that: - pg_3_info_result is not changed - - pg_3_info_result.placement_groups[0].name == '{{ resource_prefix }}-pg3' + - pg_3_info_result.placement_groups[0].name == resource_prefix ~ '-pg3' - pg_3_info_result.placement_groups[0].state == "available" - pg_3_info_result.placement_groups[0].strategy == "partition" - '"ec2:DescribePlacementGroups" in pg_3_info_result.resource_actions' @@ -221,7 +221,7 @@ - assert: that: - pg_3_create is not changed - - pg_3_create.placement_group.name == '{{ resource_prefix }}-pg3' + - pg_3_create.placement_group.name == resource_prefix ~ '-pg3' - pg_3_create.placement_group.state == "available" - '"ec2:CreatePlacementGroup" not in pg_3_create.resource_actions' @@ -237,7 +237,7 @@ - assert: that: - pg_3_create_check_mode_idem is not changed - - pg_3_create_check_mode_idem.placement_group.name == '{{ resource_prefix }}-pg3' + - pg_3_create_check_mode_idem.placement_group.name == resource_prefix ~ '-pg3' - pg_3_create_check_mode_idem.placement_group.state == "available" - '"ec2:CreatePlacementGroup" not in pg_3_create_check_mode_idem.resource_actions' diff --git a/tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml b/tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml index 8d055c0ac22..3c4bbcb28c7 100644 --- a/tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml +++ b/tests/integration/targets/ecs_cluster/tasks/20_ecs_service.yml @@ -348,7 +348,7 @@ assert: that: - ecs_service_creation_hcgp.changed - - "{{ecs_service_creation_hcgp.service.healthCheckGracePeriodSeconds}} == 30" + - ecs_service_creation_hcgp.service.healthCheckGracePeriodSeconds == 30 - name: update ecs_service using health_check_grace_period_seconds ecs_service: @@ -368,7 +368,7 @@ assert: that: - ecs_service_creation_hcgp2.changed - - "{{ecs_service_creation_hcgp2.service.healthCheckGracePeriodSeconds}} == 10" + - ecs_service_creation_hcgp2.service.healthCheckGracePeriodSeconds == 10 - name: update ecs_service using REPLICA scheduling_strategy ecs_service: @@ -453,8 +453,8 @@ assert: that: - ecs_task_definition_constraints is changed - - ecs_task_definition_constraints.taskdefinition.placementConstraints[0].type == "{{ ecs_taskdefinition_placement_constraints[0].type }}" - - ecs_task_definition_constraints.taskdefinition.placementConstraints[0].expression == "{{ ecs_taskdefinition_placement_constraints[0].expression }}" + - ecs_task_definition_constraints.taskdefinition.placementConstraints[0].type == ecs_taskdefinition_placement_constraints[0].type + - ecs_task_definition_constraints.taskdefinition.placementConstraints[0].expression == ecs_taskdefinition_placement_constraints[0].expression - name: Remove ecs task definition with placement constraints ecs_taskdefinition: diff --git a/tests/integration/targets/ecs_ecr/tasks/main.yml b/tests/integration/targets/ecs_ecr/tasks/main.yml index 88a31fbe9ff..68750e06e09 100644 --- a/tests/integration/targets/ecs_ecr/tasks/main.yml +++ b/tests/integration/targets/ecs_ecr/tasks/main.yml @@ -597,7 +597,7 @@ - name: it should use the provided KMS key assert: that: - - result.repository.encryptionConfiguration.kmsKey == '{{ kms_test_key.key_arn }}' + - result.repository.encryptionConfiguration.kmsKey == kms_test_key.key_arn always: diff --git a/tests/integration/targets/ecs_tag/tasks/main.yml b/tests/integration/targets/ecs_tag/tasks/main.yml index 597caaaa202..2c5614eb8bc 100644 --- a/tests/integration/targets/ecs_tag/tasks/main.yml +++ b/tests/integration/targets/ecs_tag/tasks/main.yml @@ -73,7 +73,7 @@ assert: that: - taglist.changed == true - - taglist.added_tags.Name == "{{ resource_prefix }}" + - taglist.added_tags.Name == resource_prefix - taglist.added_tags.another == "foobar" - name: cluster tags - Add tags to cluster again @@ -162,8 +162,8 @@ assert: that: - taglist.changed == true - - taglist.added_tags.Name == "service-{{ resource_prefix }}" - - taglist.tags.Name == "service-{{ resource_prefix }}" + - "taglist.added_tags.Name == 'service-' ~ resource_prefix" + - "taglist.tags.Name == 'service-' ~ resource_prefix" - name: services tags - Add name tag again - see no change ecs_tag: @@ -179,7 +179,7 @@ assert: that: - taglist.changed == false - - taglist.tags.Name == "service-{{ resource_prefix }}" + - "taglist.tags.Name == 'service-' ~ resource_prefix" - name: service tags - remove service tags ecs_tag: @@ -215,8 +215,8 @@ assert: that: - taglist.changed == true - - taglist.added_tags.Name == "task_definition-{{ resource_prefix }}" - - taglist.tags.Name == "task_definition-{{ resource_prefix }}" + - "taglist.added_tags.Name == 'task_definition-' ~ resource_prefix" + - "taglist.tags.Name == 'task_definition-' ~ resource_prefix" - name: task_definition tags - Add name tag again - see no change ecs_tag: @@ -232,7 +232,7 @@ assert: that: - taglist.changed == false - - taglist.tags.Name == "task_definition-{{ resource_prefix }}" + - "taglist.tags.Name == 'task_definition-' ~ resource_prefix" - name: task_definition tags - remove task_definition tags ecs_tag: diff --git a/tests/integration/targets/efs/tasks/main.yml b/tests/integration/targets/efs/tasks/main.yml index 19e0ee7a5a9..bc23f3a1199 100644 --- a/tests/integration/targets/efs/tasks/main.yml +++ b/tests/integration/targets/efs/tasks/main.yml @@ -98,7 +98,7 @@ - efs_result.efs[0].mount_targets[1].security_groups[0] == vpc_default_sg_id - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by id @@ -107,7 +107,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by tag @@ -117,7 +117,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by target (subnet_id) @@ -127,7 +127,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by target (security_group_id) @@ -137,7 +137,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Get EFS by tag and target @@ -149,7 +149,7 @@ register: efs_result - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ # Not checking efs_result.efs["throughput_mode"] here as @@ -231,7 +231,7 @@ - efs_result.efs[0].file_system_id == created_efs.efs.file_system_id - assert: - that: "{{efs_result_assertions}}" + that: efs_result_assertions # ============================================================ - name: Efs configure IA transition @@ -366,7 +366,7 @@ - efs_tag_result.tags.Env is defined - efs_tag_result.tags.Env is search("IntegrationTests") - efs_tag_result.tags.Name is defined - - efs_tag_result.tags.Name is search("{{ efs_name }}-test-tag") + - efs_tag_result.tags.Name is search(efs_name ~ '-test-tag') - efs_tag_result.tags["CamelCase"] == 'SimpleCamelCase' - efs_tag_result.tags["Title Case"] == 'Hello Cruel World' - efs_tag_result.tags["lowercase spaced"] == 'hello cruel world' @@ -464,7 +464,7 @@ - efs_tag_result.tags.Env is defined - efs_tag_result.tags.Env is search("IntegrationTests") - efs_tag_result.tags.Name is defined - - efs_tag_result.tags.Name is search("{{ efs_name }}-test-tag") + - efs_tag_result.tags.Name is search(efs_name ~ '-test-tag') - not efs_tag_result.tags["CamelCase"] is defined - not efs_tag_result.tags["Title Case"] is defined - not efs_tag_result.tags["lowercase spaced"] is defined diff --git a/tests/integration/targets/elasticache/tasks/main.yml b/tests/integration/targets/elasticache/tasks/main.yml index 6e567fe687c..9664a70f14e 100644 --- a/tests/integration/targets/elasticache/tasks/main.yml +++ b/tests/integration/targets/elasticache/tasks/main.yml @@ -60,8 +60,8 @@ that: - elasticache_redis is changed - elasticache_redis.elasticache.data is defined - - elasticache_redis.elasticache.name == "{{ elasticache_redis_test_name }}" - - elasticache_redis.elasticache.data.CacheSubnetGroupName == "{{ elasticache_subnet_group_name }}" + - elasticache_redis.elasticache.name == elasticache_redis_test_name + - elasticache_redis.elasticache.data.CacheSubnetGroupName == elasticache_subnet_group_name - name: Add security group for Redis access in Elasticache ec2_security_group: 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 dc099388648..b09e8807269 100644 --- a/tests/integration/targets/elb_classic_lb_info/tasks/main.yml +++ b/tests/integration/targets/elb_classic_lb_info/tasks/main.yml @@ -55,8 +55,8 @@ that: - create is changed # We rely on these for the info test, make sure they're what we expect - - '"{{ aws_region }}a" in create.elb.zones' - - '"{{ aws_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 - - '"{{ aws_region }}a" in elb.availability_zones' - - '"{{ aws_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" @@ -134,7 +134,7 @@ - assert: that: - update_az is changed - - update_az.elb.zones[0] == "{{ aws_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 - - '"{{ aws_region }}c" in elb.availability_zones[0]' + - aws_region ~ 'c' in elb.availability_zones[0] vars: elb: "{{ info.elbs[0] }}" @@ -170,9 +170,9 @@ - assert: that: - update_az is changed - - '"{{ aws_region }}a" in update_az.elb.zones' - - '"{{ aws_region }}b" in update_az.elb.zones' - - '"{{ aws_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 - - '"{{ aws_region }}a" in elb.availability_zones' - - '"{{ aws_region }}b" in elb.availability_zones' - - '"{{ aws_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] }}" diff --git a/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml b/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml index b55a0777f79..f1e920de8f7 100644 --- a/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml +++ b/tests/integration/targets/elb_network_lb/tasks/test_nlb_tags.yml @@ -34,7 +34,7 @@ - assert: that: - nlb.changed - - 'nlb.tags.created_by == "NLB test {{ resource_prefix }}"' + - nlb.tags.created_by == 'NLB test ' ~ resource_prefix - name: test tags are not removed if unspecified elb_network_lb: @@ -46,7 +46,7 @@ - assert: that: - not nlb.changed - - 'nlb.tags.created_by == "NLB test {{ resource_prefix }}"' + - nlb.tags.created_by == 'NLB test ' ~ resource_prefix - name: remove tags from NLB elb_network_lb: diff --git a/tests/integration/targets/elb_target/tasks/ec2_target.yml b/tests/integration/targets/elb_target/tasks/ec2_target.yml index af11b655f9e..20931f1d7de 100644 --- a/tests/integration/targets/elb_target/tasks/ec2_target.yml +++ b/tests/integration/targets/elb_target/tasks/ec2_target.yml @@ -147,7 +147,7 @@ - result.health_check_protocol == 'TCP' - '"tags" in result' - '"target_group_arn" in result' - - result.target_group_name == "{{ tg_name }}-nlb" + - result.target_group_name == tg_name ~ '-nlb' - result.target_type == 'instance' - result.deregistration_delay_timeout_seconds == '60' - result.deregistration_delay_connection_termination_enabled @@ -214,7 +214,7 @@ - '"load_balancer_arn" in result' - '"tags" in result' - result.type == 'network' - - result.vpc_id == '{{ vpc.vpc.id }}' + - result.vpc_id == vpc.vpc.id - name: modify up testing target group for NLB (preserve_client_ip_enabled=false) elb_target_group: diff --git a/tests/integration/targets/elb_target_info/tasks/main.yml b/tests/integration/targets/elb_target_info/tasks/main.yml index 031a1c7177c..fadce2135e2 100644 --- a/tests/integration/targets/elb_target_info/tasks/main.yml +++ b/tests/integration/targets/elb_target_info/tasks/main.yml @@ -207,9 +207,9 @@ - assert: that: - - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" - (target_facts.instance_target_groups | length) == 2 msg: "target facts showed the target in the right target groups" @@ -228,9 +228,9 @@ - assert: that: - - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ idle_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "idle_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" - (target_facts.instance_target_groups | length) == 3 msg: "target facts reflected the addition of the target to the idle group" @@ -242,9 +242,9 @@ - assert: that: - - "{{ alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" - - "{{ idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn')) }}" + - "alb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "nlb_target_group.target_group_arn in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" + - "idle_target_group.target_group_arn not in (target_facts.instance_target_groups | map(attribute='target_group_arn'))" - (target_facts.instance_target_groups | length) == 2 msg: "target_facts.instance_target_groups did not gather unused target groups when variable was set" diff --git a/tests/integration/targets/inventory_aws_mq/playbooks/test_inventory_with_hostvars_prefix_suffix.yml b/tests/integration/targets/inventory_aws_mq/playbooks/test_inventory_with_hostvars_prefix_suffix.yml index b0598b1088c..2db7f76ab15 100644 --- a/tests/integration/targets/inventory_aws_mq/playbooks/test_inventory_with_hostvars_prefix_suffix.yml +++ b/tests/integration/targets/inventory_aws_mq/playbooks/test_inventory_with_hostvars_prefix_suffix.yml @@ -16,9 +16,9 @@ - name: assert the hostvars are defined with prefix and/or suffix assert: that: - - "hostvars[broker_name].{{ vars_prefix }}host_instance_type{{ vars_suffix }} == 'mq.t3.micro'" - - "hostvars[broker_name].{{ vars_prefix }}engine_type{{ vars_suffix }} == '{{ engine }}'" - - "hostvars[broker_name].{{ vars_prefix }}broker_state{{ vars_suffix }} in ('CREATION_IN_PROGRESS', 'RUNNING')" + - "hostvars[broker_name][vars_prefix ~ 'host_instance_type' ~ vars_suffix] == 'mq.t3.micro'" + - "hostvars[broker_name][vars_prefix ~ 'engine_type' ~ vars_suffix] == engine" + - "hostvars[broker_name][vars_prefix ~ 'broker_state' ~ vars_suffix] in ('CREATION_IN_PROGRESS', 'RUNNING')" - "'host_instance_type' not in hostvars[broker_name]" - "'engine_type' not in hostvars[broker_name]" - "'broker_state' not in hostvars[broker_name]" diff --git a/tests/integration/targets/inventory_aws_mq/playbooks/test_populating_inventory.yml b/tests/integration/targets/inventory_aws_mq/playbooks/test_populating_inventory.yml index d138b76ac41..a71043c709c 100644 --- a/tests/integration/targets/inventory_aws_mq/playbooks/test_populating_inventory.yml +++ b/tests/integration/targets/inventory_aws_mq/playbooks/test_populating_inventory.yml @@ -14,4 +14,4 @@ that: - "'aws_mq' in groups" - "groups.aws_mq | length == 1" - - "groups.aws_mq.0 == '{{ broker_name }}'" + - groups.aws_mq.0 == broker_name diff --git a/tests/integration/targets/lightsail/tasks/main.yml b/tests/integration/targets/lightsail/tasks/main.yml index 13c029e554c..18e76756d36 100644 --- a/tests/integration/targets/lightsail/tasks/main.yml +++ b/tests/integration/targets/lightsail/tasks/main.yml @@ -32,7 +32,7 @@ - "'instance' in result and result.instance.name == instance_name" - "result.instance.state.name == 'running'" - "result.instance.networking.ports[0].from_port == 50" - - "{{ result.instance.networking.ports|length }} == 1" + - result.instance.networking.ports|length == 1 - name: Check if it does not delete public ports config when no value is provided lightsail: diff --git a/tests/integration/targets/lightsail_snapshot/tasks/main.yml b/tests/integration/targets/lightsail_snapshot/tasks/main.yml index 4b5eddc17eb..98553d27864 100644 --- a/tests/integration/targets/lightsail_snapshot/tasks/main.yml +++ b/tests/integration/targets/lightsail_snapshot/tasks/main.yml @@ -30,7 +30,7 @@ - assert: that: - result.changed == True - - "'instance_snapshot' in result and result.instance_snapshot.name == '{{ snapshot_name }}'" + - "'instance_snapshot' in result and result.instance_snapshot.name == snapshot_name" - "result.instance_snapshot.state == 'available'" - name: Make sure instance snapshot creation is idempotent diff --git a/tests/integration/targets/msk_cluster-auth/tasks/test_create_auth.yml b/tests/integration/targets/msk_cluster-auth/tasks/test_create_auth.yml index 0ef0f157ccb..9535c235fb9 100644 --- a/tests/integration/targets/msk_cluster-auth/tasks/test_create_auth.yml +++ b/tests/integration/targets/msk_cluster-auth/tasks/test_create_auth.yml @@ -62,7 +62,7 @@ # Not always returned by API # - "msk_cluster.cluster_info.client_authentication.unauthenticated.enabled == false" - "msk_cluster.cluster_info.open_monitoring.prometheus.jmx_exporter.enabled_in_broker == false" - - "msk_cluster.cluster_info.cluster_arn.startswith('arn:aws:kafka:{{ aws_region }}:')" + - "msk_cluster.cluster_info.cluster_arn.startswith('arn:aws:kafka:' ~ aws_region ~ ':')" - name: create a msk cluster with authentication flipped from default (idempotency) msk_cluster: diff --git a/tests/integration/targets/msk_cluster/tasks/test_create.yml b/tests/integration/targets/msk_cluster/tasks/test_create.yml index 5569762bc8e..f6845059fb3 100644 --- a/tests/integration/targets/msk_cluster/tasks/test_create.yml +++ b/tests/integration/targets/msk_cluster/tasks/test_create.yml @@ -50,7 +50,7 @@ - "msk_cluster.cluster_info.broker_node_group_info.instance_type == 'kafka.t3.small'" - "msk_cluster.cluster_info.broker_node_group_info.storage_info.ebs_storage_info.volume_size == 10" - "msk_cluster.cluster_info.open_monitoring.prometheus.jmx_exporter.enabled_in_broker == false" - - "msk_cluster.cluster_info.cluster_arn.startswith('arn:aws:kafka:{{ aws_region }}:')" + - "msk_cluster.cluster_info.cluster_arn.startswith('arn:aws:kafka:' ~ aws_region ~ ':')" - name: create msk cluster (idempotency) msk_cluster: diff --git a/tests/integration/targets/msk_config/tasks/main.yml b/tests/integration/targets/msk_config/tasks/main.yml index 095ec21c2d8..5f7f6c78204 100644 --- a/tests/integration/targets/msk_config/tasks/main.yml +++ b/tests/integration/targets/msk_config/tasks/main.yml @@ -53,7 +53,7 @@ assert: that: - msk_config.revision == 1 - - "msk_config.arn.startswith('arn:aws:kafka:{{ aws_region }}:')" + - "msk_config.arn.startswith('arn:aws:kafka:' ~ aws_region ~ ':')" - "'auto.create.topics.enable=True' in msk_config.server_properties" - "'zookeeper.session.timeout.ms=18000' in msk_config.server_properties" diff --git a/tests/integration/targets/redshift/tasks/main.yml b/tests/integration/targets/redshift/tasks/main.yml index 91ca39f4d78..a50c0372e2a 100644 --- a/tests/integration/targets/redshift/tasks/main.yml +++ b/tests/integration/targets/redshift/tasks/main.yml @@ -120,7 +120,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.tags.foo == "bar"' - 'result.cluster.tags.Tizio == "Caio"' @@ -143,7 +143,7 @@ assert: that: - 'not result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.tags.foo == "bar"' - 'result.cluster.tags.Tizio == "Caio"' - 'result.cluster.tags | count() == 2' @@ -166,7 +166,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}-modified"' + - result.cluster.identifier == redshift_cluster_name ~ '-modified' - 'result.cluster.enhanced_vpc_routing == True' - 'result.cluster.tags | count() == 1' - 'result.cluster.tags.foo == "bar"' @@ -234,7 +234,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.db_name == "integration_test"' # ============================================================ @@ -260,7 +260,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.db_name == "integration_test"' - 'result.cluster.tags.foo == "bar"' @@ -289,7 +289,7 @@ assert: that: - 'result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.db_name == "integration_test"' - 'result.cluster.tags.test1 == "value1"' - 'result.cluster.tags.foo == "bar"' @@ -318,7 +318,7 @@ assert: that: - 'not result.changed' - - 'result.cluster.identifier == "{{ redshift_cluster_name }}"' + - result.cluster.identifier == redshift_cluster_name - 'result.cluster.db_name == "integration_test"' - 'result.cluster.tags | count() == 2' diff --git a/tests/integration/targets/s3_sync/tasks/main.yml b/tests/integration/targets/s3_sync/tasks/main.yml index 2263df2bf54..600490706a4 100644 --- a/tests/integration/targets/s3_sync/tasks/main.yml +++ b/tests/integration/targets/s3_sync/tasks/main.yml @@ -23,7 +23,7 @@ - assert: that: - output.changed - - output.name == "{{ test_bucket }}" + - output.name == test_bucket - not output.requester_pays # ============================================================ - name: Prepare fixtures folder @@ -67,7 +67,7 @@ - assert: that: - output.changed - - output.name == "{{ test_bucket_2 }}" + - output.name == test_bucket_2 - not output.requester_pays - name: Sync files with remote bucket using glacier storage class @@ -113,7 +113,7 @@ - assert: that: - output.changed - - output.name == "{{ test_bucket_3 }}" + - output.name == test_bucket_3 - not output.requester_pays - name: Sync individual file with remote bucket diff --git a/tests/integration/targets/sns_topic/tasks/main.yml b/tests/integration/targets/sns_topic/tasks/main.yml index c05ad3b5373..00f3f71d96a 100644 --- a/tests/integration/targets/sns_topic/tasks/main.yml +++ b/tests/integration/targets/sns_topic/tasks/main.yml @@ -62,7 +62,7 @@ that: - sns_topic_info is successful - "'result' in sns_topic_info" - - sns_topic_info.result["sns_arn"] == "{{ sns_arn }}" + - sns_topic_info.result["sns_arn"] == sns_arn - "'sns_topic' in sns_topic_info.result" - "'display_name' in sns_topic_info.result['sns_topic']" - sns_topic_info.result["sns_topic"]["display_name"] == "My topic name" @@ -79,7 +79,7 @@ that: - sns_topic_info is successful - "'result' in sns_topic_info" - - sns_topic_info.result["sns_arn"] == "{{ sns_arn }}" + - sns_topic_info.result["sns_arn"] == sns_arn - "'sns_topic' in sns_topic_info.result" - "'display_name' in sns_topic_info.result['sns_topic']" - sns_topic_info.result["sns_topic"]["display_name"] == "My topic name" @@ -110,7 +110,7 @@ that: - sns_fifo_topic.changed - sns_fifo_topic.sns_topic.topic_type == 'fifo' - - sns_fifo_topic.sns_topic.name == '{{ sns_topic_topic_name }}-fifo' + - sns_fifo_topic.sns_topic.name == sns_topic_topic_name ~ '-fifo' - name: Run create a FIFO topic again for idempotence test (with .fifo) sns_topic: diff --git a/tests/integration/targets/sqs_queue/tasks/main.yml b/tests/integration/targets/sqs_queue/tasks/main.yml index d5a9dd60370..4c16be31340 100644 --- a/tests/integration/targets/sqs_queue/tasks/main.yml +++ b/tests/integration/targets/sqs_queue/tasks/main.yml @@ -19,7 +19,7 @@ assert: that: - create_result.changed - - create_result.region == "{{ aws_region }}" + - create_result.region == aws_region always: - name: Test deleting SQS queue diff --git a/tests/integration/targets/ssm_parameter/tasks/main.yml b/tests/integration/targets/ssm_parameter/tasks/main.yml index efc09bc4b5b..7c0e27fee33 100644 --- a/tests/integration/targets/ssm_parameter/tasks/main.yml +++ b/tests/integration/targets/ssm_parameter/tasks/main.yml @@ -523,7 +523,7 @@ - name: Create parameter with tags case - Ensure tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_orig['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_orig[item.key] loop: "{{ simple_tags_orig | dict2items }}" - name: Create parameter with tags case - Ensure no missing or additional tags @@ -578,7 +578,7 @@ - name: Update description only case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_orig['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_orig[item.key] loop: "{{ simple_tags_orig | dict2items }}" - name: Update description only case - Ensure no missing or additional tags @@ -633,7 +633,7 @@ - name: Add tag to existing parameter case - Ensure tags correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_add_owner['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_add_owner[item.key] loop: "{{ simple_tags_add_owner | dict2items }}" - name: Add tag to existing parameter case - Ensure no missing or additional tags @@ -704,7 +704,7 @@ - name: Change single tag case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_change_environment['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_change_environment[item.key] loop: "{{ simple_tags_change_environment | dict2items }}" - name: Change single tag case - Ensure no missing or additional tags @@ -775,7 +775,7 @@ - name: Delete single tag case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_delete_version['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_delete_version[item.key] loop: "{{ simple_tags_delete_version | dict2items }}" - name: Delete single tag case - Ensure no missing or additional tags @@ -846,7 +846,7 @@ - name: Delete single tag w/ spaces case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_delete_tag_with_space['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_delete_tag_with_space[item.key] loop: "{{ simple_tags_delete_tag_with_space | dict2items }}" - name: Delete single tag w/ spaces case - Ensure no missing or additional tags @@ -917,7 +917,7 @@ - name: Add/delete/change tags case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_add_delete_change['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_add_delete_change[item.key] loop: "{{ simple_tags_add_delete_change | dict2items }}" - name: Add/delete/change tags case - Ensure no missing or additional tags @@ -988,7 +988,7 @@ - name: Delete all tags case - Ensure expected tags is correct assert: that: - - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_delete_all_tags['{{ item.key }}'] + - result.parameter_metadata.tags[item.key] == simple_tags_delete_all_tags[item.key] loop: "{{ simple_tags_delete_all_tags | dict2items }}" - name: Delete all tags case - Ensure no missing or additional tags @@ -1062,8 +1062,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_add_owner))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_add_owner))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_add_owner) | dict2items }} @@ -1071,8 +1071,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_add_owner) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_add_owner) | dict2items | length - name: Add tag case (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1140,8 +1140,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_add_multiple))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_add_multiple))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_add_multiple) | dict2items }} @@ -1149,8 +1149,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_add_multiple) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_add_multiple) | dict2items | length - name: Add multiple tags case (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1218,8 +1218,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_change_environment))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_change_environment))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_change_environment) | dict2items }} loop_control: @@ -1230,8 +1230,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_change_environment) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_change_environment) | dict2items | length - name: Change tag case (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1299,8 +1299,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_change_multiple))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_change_multiple))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_change_multiple) | dict2items }} loop_control: @@ -1311,8 +1311,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_change_multiple) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_change_multiple) | dict2items | length - name: Change multiple tags (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1380,8 +1380,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == - (simple_tags_orig | combine(simple_tags_purge_false_add_and_change))['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == + (simple_tags_orig | combine(simple_tags_purge_false_add_and_change))[item.key] loop: > {{ simple_tags_orig | combine(simple_tags_purge_false_add_and_change) | dict2items }} loop_control: @@ -1392,8 +1392,8 @@ assert: that: - > - result.parameter_metadata.tags | length == {{ simple_tags_orig | - combine(simple_tags_purge_false_add_and_change) | dict2items }} | length + result.parameter_metadata.tags | length == simple_tags_orig | + combine(simple_tags_purge_false_add_and_change) | dict2items | length - name: Add/Change multiple tags (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1461,7 +1461,7 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] == simple_tags_orig['{{ item.key }}'] + result.parameter_metadata.tags[item.key] == simple_tags_orig[item.key] loop: > {{ simple_tags_orig | dict2items }} loop_control: @@ -1472,7 +1472,7 @@ that: - > result.parameter_metadata.tags | length - == {{ simple_tags_orig | dict2items }} | length + == simple_tags_orig | dict2items | length - name: Empty tags dict (purge_tags=false) - Lookup a tagged parameter set_fact: @@ -1538,8 +1538,8 @@ assert: that: - > - result.parameter_metadata.tags['{{ item.key }}'] - == simple_tags_orig['{{ item.key }}'] + result.parameter_metadata.tags[item.key] + == simple_tags_orig[item.key] loop: > {{ simple_tags_orig | dict2items }} loop_control: @@ -1550,7 +1550,7 @@ that: - > result.parameter_metadata.tags | length - == {{ simple_tags_orig | dict2items }} | length + == simple_tags_orig | dict2items | length - name: No tags parameter (purge_tags=true) - Lookup a tagged parameter set_fact: diff --git a/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml b/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml index a1919f1aedf..061acb2c369 100644 --- a/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml +++ b/tests/integration/targets/stepfunctions_state_machine/tasks/main.yml @@ -112,7 +112,7 @@ - assert: that: - update_check.changed == True - - "update_check.output == 'State machine would be updated: {{ creation_output.state_machine_arn }}'" + - "update_check.output == 'State machine would be updated: ' ~ creation_output.state_machine_arn" - name: Update an existing state machine stepfunctions_state_machine: @@ -265,7 +265,7 @@ - assert: that: - deletion_check.changed == True - - "deletion_check.output == 'State machine would be deleted: {{ creation_output.state_machine_arn }}'" + - "deletion_check.output == 'State machine would be deleted: ' ~ creation_output.state_machine_arn" - name: Remove state machine stepfunctions_state_machine: diff --git a/tests/integration/targets/waf_web_acl/tasks/main.yml b/tests/integration/targets/waf_web_acl/tasks/main.yml index 285ee2b3742..acbf1f29c85 100644 --- a/tests/integration/targets/waf_web_acl/tasks/main.yml +++ b/tests/integration/targets/waf_web_acl/tasks/main.yml @@ -561,7 +561,7 @@ assert: that: - remove_in_use_condition.failed - - "'Condition {{ resource_prefix }}_size_condition is in use' in remove_in_use_condition.msg" + - "'Condition ' ~ resource_prefix ~ '_size_condition is in use' in remove_in_use_condition.msg" - name: create WAF Regional rule waf_rule: @@ -674,7 +674,7 @@ assert: that: - remove_in_use_condition.failed - - "'Condition {{ resource_prefix }}_size_condition is in use' in remove_in_use_condition.msg" + - "'Condition ' ~ resource_prefix ~ '_size_condition is in use' in remove_in_use_condition.msg" ################################################## # aws_waf_web_acl tests