From 4e0d83c65568a99a24307e37a14e6e0b173c948b Mon Sep 17 00:00:00 2001 From: jillr Date: Thu, 29 Apr 2021 21:58:50 +0000 Subject: [PATCH 01/16] Remove shippable references from repo This collection has been operating on Zuul CI for some weeks now --- README.md | 2 - shippable.yml | 26 --- tests/integration/targets/aws_acm/aliases | 1 - .../targets/aws_api_gateway/aliases | 1 - .../integration/targets/aws_codebuild/aliases | 1 - .../targets/aws_codecommit/aliases | 1 - .../targets/aws_codepipeline/aliases | 1 - .../targets/aws_elasticbeanstalk_app/aliases | 1 - .../targets/aws_glue_connection/aliases | 1 - .../targets/aws_inspector_target/aliases | 1 - tests/integration/targets/aws_kms/aliases | 1 - .../targets/aws_region_info/aliases | 1 - .../targets/aws_s3_bucket_info/aliases | 1 - .../targets/aws_ses_identity/aliases | 1 - .../targets/aws_ses_identity_policy/aliases | 1 - .../targets/aws_ses_rule_set/aliases | 1 - .../targets/aws_ssm_parameter_store/aliases | 1 - .../aws_step_functions_state_machine/aliases | 1 - .../cloudformation_exports_info/aliases | 1 - .../targets/cloudwatchlogs/aliases | 1 - .../targets/connection_aws_ssm/aliases | 1 - tests/integration/targets/ec2_eip/aliases | 1 - .../integration/targets/ec2_instance/aliases | 3 + .../targets/ec2_launch_template/aliases | 1 - .../targets/ec2_metric_alarm/aliases | 1 - .../targets/ec2_scaling_policy/aliases | 1 - .../targets/ec2_transit_gateway/aliases | 1 - .../targets/ec2_vpc_egress_igw/aliases | 1 - .../targets/ec2_vpc_endpoint/aliases | 1 - .../ec2_vpc_endpoint_service_info/aliases | 1 - tests/integration/targets/ec2_vpc_igw/aliases | 1 - .../integration/targets/ec2_vpc_nacl/aliases | 1 - .../targets/ec2_vpc_nat_gateway/aliases | 1 - .../integration/targets/ec2_vpc_peer/aliases | 1 - .../targets/ec2_vpc_route_table/aliases | 1 - tests/integration/targets/ec2_vpc_vgw/aliases | 1 - .../targets/ec2_vpc_vpn_info/aliases | 1 - tests/integration/targets/ecs_ecr/aliases | 1 - tests/integration/targets/elasticache/aliases | 1 - .../targets/elb_application_lb/aliases | 1 - .../targets/elb_application_lb_info/aliases | 1 - .../targets/elb_classic_lb/aliases | 1 - tests/integration/targets/elb_target/aliases | 1 - .../targets/iam_saml_federation/aliases | 1 - .../targets/kinesis_stream/aliases | 1 - tests/integration/targets/lambda/aliases | 1 - .../integration/targets/lambda_alias/aliases | 1 - .../integration/targets/lambda_policy/aliases | 1 - tests/integration/targets/lightsail/aliases | 1 - .../targets/rds_param_group/aliases | 1 - .../targets/rds_subnet_group/aliases | 1 - tests/integration/targets/redshift/aliases | 1 - tests/integration/targets/route53/aliases | 1 - .../integration/targets/route53_zone/aliases | 1 - .../targets/s3_bucket_notification/aliases | 1 - .../integration/targets/s3_lifecycle/aliases | 1 - tests/integration/targets/s3_logging/aliases | 1 - .../targets/s3_metrics_configuration/aliases | 1 - tests/integration/targets/s3_sync/aliases | 1 - .../targets/script_inventory_ec2/aliases | 1 - tests/integration/targets/sns/aliases | 1 - tests/integration/targets/sqs_queue/aliases | 1 - .../targets/sts_assume_role/aliases | 1 - tests/integration/targets/wafv2/aliases | 1 - .../integration/targets/wafv2_ip_set/aliases | 1 - tests/sanity/ignore-2.10.txt | 2 +- tests/sanity/ignore-2.11.txt | 2 +- tests/sanity/ignore-2.12.txt | 2 +- tests/sanity/ignore-2.9.txt | 2 +- tests/utils/shippable/aws.sh | 19 -- tests/utils/shippable/check_matrix.py | 120 ---------- tests/utils/shippable/sanity.sh | 14 -- tests/utils/shippable/shippable.sh | 219 ------------------ tests/utils/shippable/timing.py | 16 -- tests/utils/shippable/timing.sh | 5 - tests/utils/shippable/units.sh | 11 - 76 files changed, 7 insertions(+), 498 deletions(-) delete mode 100644 shippable.yml create mode 100644 tests/integration/targets/ec2_instance/aliases delete mode 100755 tests/utils/shippable/aws.sh delete mode 100755 tests/utils/shippable/check_matrix.py delete mode 100755 tests/utils/shippable/sanity.sh delete mode 100755 tests/utils/shippable/shippable.sh delete mode 100755 tests/utils/shippable/timing.py delete mode 100755 tests/utils/shippable/timing.sh delete mode 100755 tests/utils/shippable/units.sh diff --git a/README.md b/README.md index 378b627cae8..6c2e3fafdc9 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,4 @@ # Community AWS Collection -[![Shippable build status](https://api.shippable.com/projects//5e5ed2ae0fcc0d0006d2c037badge?branch=main)](https://api.shippable.com/projects/i5e5ed2ae0fcc0d0006d2c037/badge?branch=main) - The Ansible Community AWS collection includes a variety of Ansible content to help automate the management of AWS instances. This collection is maintained by the Ansible community. diff --git a/shippable.yml b/shippable.yml deleted file mode 100644 index 03c9fd8ada0..00000000000 --- a/shippable.yml +++ /dev/null @@ -1,26 +0,0 @@ -language: python - -env: - matrix: - - T=none - -matrix: - include: - - env: T=none -branches: - except: - - "*-patch-*" - - "revert-*-*" - -build: - ci: - - tests/utils/shippable/timing.sh tests/utils/shippable/shippable.sh $T - -integrations: - notifications: - - integrationName: email - type: email - on_success: never - on_failure: never - on_start: never - on_pull_request: never diff --git a/tests/integration/targets/aws_acm/aliases b/tests/integration/targets/aws_acm/aliases index 7f03376a735..6977920fdc5 100644 --- a/tests/integration/targets/aws_acm/aliases +++ b/tests/integration/targets/aws_acm/aliases @@ -2,6 +2,5 @@ unstable cloud/aws -shippable/aws/group2 aws_acm_info diff --git a/tests/integration/targets/aws_api_gateway/aliases b/tests/integration/targets/aws_api_gateway/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_api_gateway/aliases +++ b/tests/integration/targets/aws_api_gateway/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/aws_codebuild/aliases b/tests/integration/targets/aws_codebuild/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_codebuild/aliases +++ b/tests/integration/targets/aws_codebuild/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/aws_codecommit/aliases b/tests/integration/targets/aws_codecommit/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_codecommit/aliases +++ b/tests/integration/targets/aws_codecommit/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/aws_codepipeline/aliases b/tests/integration/targets/aws_codepipeline/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_codepipeline/aliases +++ b/tests/integration/targets/aws_codepipeline/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/aws_elasticbeanstalk_app/aliases b/tests/integration/targets/aws_elasticbeanstalk_app/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_elasticbeanstalk_app/aliases +++ b/tests/integration/targets/aws_elasticbeanstalk_app/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/aws_glue_connection/aliases b/tests/integration/targets/aws_glue_connection/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_glue_connection/aliases +++ b/tests/integration/targets/aws_glue_connection/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/aws_inspector_target/aliases b/tests/integration/targets/aws_inspector_target/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_inspector_target/aliases +++ b/tests/integration/targets/aws_inspector_target/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/aws_kms/aliases b/tests/integration/targets/aws_kms/aliases index d843dcfe965..4e5d9c7f9e7 100644 --- a/tests/integration/targets/aws_kms/aliases +++ b/tests/integration/targets/aws_kms/aliases @@ -3,6 +3,5 @@ unstable cloud/aws -shippable/aws/group2 aws_kms_info diff --git a/tests/integration/targets/aws_region_info/aliases b/tests/integration/targets/aws_region_info/aliases index 72a9fb4f570..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_region_info/aliases +++ b/tests/integration/targets/aws_region_info/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group4 diff --git a/tests/integration/targets/aws_s3_bucket_info/aliases b/tests/integration/targets/aws_s3_bucket_info/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_s3_bucket_info/aliases +++ b/tests/integration/targets/aws_s3_bucket_info/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/aws_ses_identity/aliases b/tests/integration/targets/aws_ses_identity/aliases index 157ce0c9d4c..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_ses_identity/aliases +++ b/tests/integration/targets/aws_ses_identity/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group3 diff --git a/tests/integration/targets/aws_ses_identity_policy/aliases b/tests/integration/targets/aws_ses_identity_policy/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_ses_identity_policy/aliases +++ b/tests/integration/targets/aws_ses_identity_policy/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/aws_ses_rule_set/aliases b/tests/integration/targets/aws_ses_rule_set/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_ses_rule_set/aliases +++ b/tests/integration/targets/aws_ses_rule_set/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/aws_ssm_parameter_store/aliases b/tests/integration/targets/aws_ssm_parameter_store/aliases index 72a9fb4f570..4ef4b2067d0 100644 --- a/tests/integration/targets/aws_ssm_parameter_store/aliases +++ b/tests/integration/targets/aws_ssm_parameter_store/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group4 diff --git a/tests/integration/targets/aws_step_functions_state_machine/aliases b/tests/integration/targets/aws_step_functions_state_machine/aliases index 3ac1e6c4b4b..93605708377 100644 --- a/tests/integration/targets/aws_step_functions_state_machine/aliases +++ b/tests/integration/targets/aws_step_functions_state_machine/aliases @@ -1,4 +1,3 @@ cloud/aws -shippable/aws/group2 aws_step_functions_state_machine_execution diff --git a/tests/integration/targets/cloudformation_exports_info/aliases b/tests/integration/targets/cloudformation_exports_info/aliases index c61e327ad48..f796c19f4a6 100644 --- a/tests/integration/targets/cloudformation_exports_info/aliases +++ b/tests/integration/targets/cloudformation_exports_info/aliases @@ -2,4 +2,3 @@ unstable cloud/aws -shippable/aws/group3 diff --git a/tests/integration/targets/cloudwatchlogs/aliases b/tests/integration/targets/cloudwatchlogs/aliases index 513f7fc6344..23b6fbe1e9a 100644 --- a/tests/integration/targets/cloudwatchlogs/aliases +++ b/tests/integration/targets/cloudwatchlogs/aliases @@ -1,5 +1,4 @@ cloud/aws -shippable/aws/group1 cloudwatchlogs_log_group cloudwatchlogs_log_group_metric_filter diff --git a/tests/integration/targets/connection_aws_ssm/aliases b/tests/integration/targets/connection_aws_ssm/aliases index 4f28d1ebf75..f15dd4b0a6e 100644 --- a/tests/integration/targets/connection_aws_ssm/aliases +++ b/tests/integration/targets/connection_aws_ssm/aliases @@ -3,7 +3,6 @@ unstable cloud/aws -shippable/aws/group4 destructive non_local diff --git a/tests/integration/targets/ec2_eip/aliases b/tests/integration/targets/ec2_eip/aliases index 204d0296c05..f396da939f0 100644 --- a/tests/integration/targets/ec2_eip/aliases +++ b/tests/integration/targets/ec2_eip/aliases @@ -2,4 +2,3 @@ unstable cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/ec2_instance/aliases b/tests/integration/targets/ec2_instance/aliases new file mode 100644 index 00000000000..8c28dbb46b0 --- /dev/null +++ b/tests/integration/targets/ec2_instance/aliases @@ -0,0 +1,3 @@ +cloud/aws + +ec2_instance_info diff --git a/tests/integration/targets/ec2_launch_template/aliases b/tests/integration/targets/ec2_launch_template/aliases index 157ce0c9d4c..4ef4b2067d0 100644 --- a/tests/integration/targets/ec2_launch_template/aliases +++ b/tests/integration/targets/ec2_launch_template/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group3 diff --git a/tests/integration/targets/ec2_metric_alarm/aliases b/tests/integration/targets/ec2_metric_alarm/aliases index 72a9fb4f570..4ef4b2067d0 100644 --- a/tests/integration/targets/ec2_metric_alarm/aliases +++ b/tests/integration/targets/ec2_metric_alarm/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group4 diff --git a/tests/integration/targets/ec2_scaling_policy/aliases b/tests/integration/targets/ec2_scaling_policy/aliases index 157ce0c9d4c..4ef4b2067d0 100644 --- a/tests/integration/targets/ec2_scaling_policy/aliases +++ b/tests/integration/targets/ec2_scaling_policy/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group3 diff --git a/tests/integration/targets/ec2_transit_gateway/aliases b/tests/integration/targets/ec2_transit_gateway/aliases index 6dabae18b5a..cfcde0de380 100644 --- a/tests/integration/targets/ec2_transit_gateway/aliases +++ b/tests/integration/targets/ec2_transit_gateway/aliases @@ -1,4 +1,3 @@ cloud/aws -shippable/aws/group4 ec2_transit_gateway_info diff --git a/tests/integration/targets/ec2_vpc_egress_igw/aliases b/tests/integration/targets/ec2_vpc_egress_igw/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/ec2_vpc_egress_igw/aliases +++ b/tests/integration/targets/ec2_vpc_egress_igw/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/ec2_vpc_endpoint/aliases b/tests/integration/targets/ec2_vpc_endpoint/aliases index 68d272f2799..ce6ba529062 100644 --- a/tests/integration/targets/ec2_vpc_endpoint/aliases +++ b/tests/integration/targets/ec2_vpc_endpoint/aliases @@ -1,4 +1,3 @@ cloud/aws -shippable/aws/group2 ec2_vpc_endpoint_info diff --git a/tests/integration/targets/ec2_vpc_endpoint_service_info/aliases b/tests/integration/targets/ec2_vpc_endpoint_service_info/aliases index bf2988bbc2e..760a04f5d2b 100644 --- a/tests/integration/targets/ec2_vpc_endpoint_service_info/aliases +++ b/tests/integration/targets/ec2_vpc_endpoint_service_info/aliases @@ -1,3 +1,2 @@ cloud/aws -shippable/aws/group2 ec2_vpc_endpoint_service_info diff --git a/tests/integration/targets/ec2_vpc_igw/aliases b/tests/integration/targets/ec2_vpc_igw/aliases index 7ab084e7a61..877a442d752 100644 --- a/tests/integration/targets/ec2_vpc_igw/aliases +++ b/tests/integration/targets/ec2_vpc_igw/aliases @@ -1,4 +1,3 @@ cloud/aws -shippable/aws/group2 ec2_vpc_igw_info diff --git a/tests/integration/targets/ec2_vpc_nacl/aliases b/tests/integration/targets/ec2_vpc_nacl/aliases index a0b5045ec87..4c474104da5 100644 --- a/tests/integration/targets/ec2_vpc_nacl/aliases +++ b/tests/integration/targets/ec2_vpc_nacl/aliases @@ -2,6 +2,5 @@ unstable cloud/aws -shippable/aws/group2 ec2_vpc_nacl_info diff --git a/tests/integration/targets/ec2_vpc_nat_gateway/aliases b/tests/integration/targets/ec2_vpc_nat_gateway/aliases index e2557d59343..f5291520b8b 100644 --- a/tests/integration/targets/ec2_vpc_nat_gateway/aliases +++ b/tests/integration/targets/ec2_vpc_nat_gateway/aliases @@ -1,3 +1,2 @@ cloud/aws -shippable/aws/group2 ec2_vpc_nat_gateway_info diff --git a/tests/integration/targets/ec2_vpc_peer/aliases b/tests/integration/targets/ec2_vpc_peer/aliases index 0e90cab464b..8807cb2514c 100644 --- a/tests/integration/targets/ec2_vpc_peer/aliases +++ b/tests/integration/targets/ec2_vpc_peer/aliases @@ -1,4 +1,3 @@ cloud/aws -shippable/aws/group1 ec2_vpc_peering_info diff --git a/tests/integration/targets/ec2_vpc_route_table/aliases b/tests/integration/targets/ec2_vpc_route_table/aliases index eb74d33251c..7bfd75cbb9f 100644 --- a/tests/integration/targets/ec2_vpc_route_table/aliases +++ b/tests/integration/targets/ec2_vpc_route_table/aliases @@ -1,4 +1,3 @@ cloud/aws -shippable/aws/group4 ec2_vpc_route_table_info diff --git a/tests/integration/targets/ec2_vpc_vgw/aliases b/tests/integration/targets/ec2_vpc_vgw/aliases index e65624834df..c78ca43136d 100644 --- a/tests/integration/targets/ec2_vpc_vgw/aliases +++ b/tests/integration/targets/ec2_vpc_vgw/aliases @@ -2,4 +2,3 @@ unstable cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/ec2_vpc_vpn_info/aliases b/tests/integration/targets/ec2_vpc_vpn_info/aliases index 3f72697111f..812fcc4c9e6 100644 --- a/tests/integration/targets/ec2_vpc_vpn_info/aliases +++ b/tests/integration/targets/ec2_vpc_vpn_info/aliases @@ -2,4 +2,3 @@ unstable cloud/aws -shippable/aws/group3 diff --git a/tests/integration/targets/ecs_ecr/aliases b/tests/integration/targets/ecs_ecr/aliases index 33058518543..16e0eb3f21b 100644 --- a/tests/integration/targets/ecs_ecr/aliases +++ b/tests/integration/targets/ecs_ecr/aliases @@ -2,4 +2,3 @@ unstable cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/elasticache/aliases b/tests/integration/targets/elasticache/aliases index ce569e50624..88ef7754817 100644 --- a/tests/integration/targets/elasticache/aliases +++ b/tests/integration/targets/elasticache/aliases @@ -3,6 +3,5 @@ unstable cloud/aws -shippable/aws/group1 elasticache_subnet_group diff --git a/tests/integration/targets/elb_application_lb/aliases b/tests/integration/targets/elb_application_lb/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/elb_application_lb/aliases +++ b/tests/integration/targets/elb_application_lb/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/elb_application_lb_info/aliases b/tests/integration/targets/elb_application_lb_info/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/elb_application_lb_info/aliases +++ b/tests/integration/targets/elb_application_lb_info/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/elb_classic_lb/aliases b/tests/integration/targets/elb_classic_lb/aliases index 8dd28f2a473..1cdb66daef8 100644 --- a/tests/integration/targets/elb_classic_lb/aliases +++ b/tests/integration/targets/elb_classic_lb/aliases @@ -4,6 +4,5 @@ unstable cloud/aws -shippable/aws/group2 elb_classic_lb_info diff --git a/tests/integration/targets/elb_target/aliases b/tests/integration/targets/elb_target/aliases index 932fe027725..5855a405d91 100644 --- a/tests/integration/targets/elb_target/aliases +++ b/tests/integration/targets/elb_target/aliases @@ -1,4 +1,3 @@ cloud/aws -shippable/aws/group4 elb_target_group diff --git a/tests/integration/targets/iam_saml_federation/aliases b/tests/integration/targets/iam_saml_federation/aliases index 72a9fb4f570..4ef4b2067d0 100644 --- a/tests/integration/targets/iam_saml_federation/aliases +++ b/tests/integration/targets/iam_saml_federation/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group4 diff --git a/tests/integration/targets/kinesis_stream/aliases b/tests/integration/targets/kinesis_stream/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/kinesis_stream/aliases +++ b/tests/integration/targets/kinesis_stream/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/lambda/aliases b/tests/integration/targets/lambda/aliases index 18f53946054..5801ee10fdd 100644 --- a/tests/integration/targets/lambda/aliases +++ b/tests/integration/targets/lambda/aliases @@ -1,5 +1,4 @@ cloud/aws -shippable/aws/group2 execute_lambda lambda_info diff --git a/tests/integration/targets/lambda_alias/aliases b/tests/integration/targets/lambda_alias/aliases index 157ce0c9d4c..4ef4b2067d0 100644 --- a/tests/integration/targets/lambda_alias/aliases +++ b/tests/integration/targets/lambda_alias/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group3 diff --git a/tests/integration/targets/lambda_policy/aliases b/tests/integration/targets/lambda_policy/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/lambda_policy/aliases +++ b/tests/integration/targets/lambda_policy/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/lightsail/aliases b/tests/integration/targets/lightsail/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/lightsail/aliases +++ b/tests/integration/targets/lightsail/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/rds_param_group/aliases b/tests/integration/targets/rds_param_group/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/rds_param_group/aliases +++ b/tests/integration/targets/rds_param_group/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/rds_subnet_group/aliases b/tests/integration/targets/rds_subnet_group/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/rds_subnet_group/aliases +++ b/tests/integration/targets/rds_subnet_group/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/redshift/aliases b/tests/integration/targets/redshift/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/redshift/aliases +++ b/tests/integration/targets/redshift/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/route53/aliases b/tests/integration/targets/route53/aliases index a70e7ee70b8..6db61c383f3 100644 --- a/tests/integration/targets/route53/aliases +++ b/tests/integration/targets/route53/aliases @@ -1,4 +1,3 @@ cloud/aws -shippable/aws/group2 route53_info diff --git a/tests/integration/targets/route53_zone/aliases b/tests/integration/targets/route53_zone/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/route53_zone/aliases +++ b/tests/integration/targets/route53_zone/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/s3_bucket_notification/aliases b/tests/integration/targets/s3_bucket_notification/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/s3_bucket_notification/aliases +++ b/tests/integration/targets/s3_bucket_notification/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/s3_lifecycle/aliases b/tests/integration/targets/s3_lifecycle/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/s3_lifecycle/aliases +++ b/tests/integration/targets/s3_lifecycle/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/s3_logging/aliases b/tests/integration/targets/s3_logging/aliases index 157ce0c9d4c..4ef4b2067d0 100644 --- a/tests/integration/targets/s3_logging/aliases +++ b/tests/integration/targets/s3_logging/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group3 diff --git a/tests/integration/targets/s3_metrics_configuration/aliases b/tests/integration/targets/s3_metrics_configuration/aliases index fd132af5f03..4ef4b2067d0 100644 --- a/tests/integration/targets/s3_metrics_configuration/aliases +++ b/tests/integration/targets/s3_metrics_configuration/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 \ No newline at end of file diff --git a/tests/integration/targets/s3_sync/aliases b/tests/integration/targets/s3_sync/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/s3_sync/aliases +++ b/tests/integration/targets/s3_sync/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/script_inventory_ec2/aliases b/tests/integration/targets/script_inventory_ec2/aliases index 092d6ac64b5..9d7098a61e5 100644 --- a/tests/integration/targets/script_inventory_ec2/aliases +++ b/tests/integration/targets/script_inventory_ec2/aliases @@ -1,2 +1 @@ -shippable/posix/group2 needs/file/contrib/inventory/ec2.py diff --git a/tests/integration/targets/sns/aliases b/tests/integration/targets/sns/aliases index a112c3d1bb2..4ef4b2067d0 100644 --- a/tests/integration/targets/sns/aliases +++ b/tests/integration/targets/sns/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group1 diff --git a/tests/integration/targets/sqs_queue/aliases b/tests/integration/targets/sqs_queue/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/sqs_queue/aliases +++ b/tests/integration/targets/sqs_queue/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/sts_assume_role/aliases b/tests/integration/targets/sts_assume_role/aliases index 6e3860bee23..4ef4b2067d0 100644 --- a/tests/integration/targets/sts_assume_role/aliases +++ b/tests/integration/targets/sts_assume_role/aliases @@ -1,2 +1 @@ cloud/aws -shippable/aws/group2 diff --git a/tests/integration/targets/wafv2/aliases b/tests/integration/targets/wafv2/aliases index b28081f9633..53978c542e1 100644 --- a/tests/integration/targets/wafv2/aliases +++ b/tests/integration/targets/wafv2/aliases @@ -1,5 +1,4 @@ cloud/aws -shippable/aws/group1 wafv2_resources wafv2_resources_info diff --git a/tests/integration/targets/wafv2_ip_set/aliases b/tests/integration/targets/wafv2_ip_set/aliases index 12354953063..8bdd6b5eeda 100644 --- a/tests/integration/targets/wafv2_ip_set/aliases +++ b/tests/integration/targets/wafv2_ip_set/aliases @@ -1,5 +1,4 @@ cloud/aws -shippable/aws/group1 wafv2_ip_set wafv2_ip_set_info diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index bb27535d55a..b808f6884c0 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -2185,4 +2185,4 @@ plugins/modules/wafv2_web_acl_info.py import-3.7!skip plugins/modules/wafv2_web_acl_info.py metaclass-boilerplate!skip tests/sanity/refresh_ignore_files shebang!skip tests/utils/shippable/check_matrix.py replace-urlopen -tests/utils/shippable/timing.py shebang \ No newline at end of file +tests/utils/shippable/timing.py shebang diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index f9bdb991b0c..0d5dfd22552 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -2187,4 +2187,4 @@ plugins/modules/wafv2_web_acl_info.py import-3.7!skip plugins/modules/wafv2_web_acl_info.py metaclass-boilerplate!skip tests/sanity/refresh_ignore_files shebang!skip tests/utils/shippable/check_matrix.py replace-urlopen -tests/utils/shippable/timing.py shebang \ No newline at end of file +tests/utils/shippable/timing.py shebang diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index f9bdb991b0c..0d5dfd22552 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -2187,4 +2187,4 @@ plugins/modules/wafv2_web_acl_info.py import-3.7!skip plugins/modules/wafv2_web_acl_info.py metaclass-boilerplate!skip tests/sanity/refresh_ignore_files shebang!skip tests/utils/shippable/check_matrix.py replace-urlopen -tests/utils/shippable/timing.py shebang \ No newline at end of file +tests/utils/shippable/timing.py shebang diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index 09607ea2eee..72e6f6bfdf9 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -2229,4 +2229,4 @@ plugins/modules/wafv2_web_acl_info.py import-3.7!skip plugins/modules/wafv2_web_acl_info.py metaclass-boilerplate!skip tests/sanity/refresh_ignore_files shebang!skip tests/utils/shippable/check_matrix.py replace-urlopen -tests/utils/shippable/timing.py shebang \ No newline at end of file +tests/utils/shippable/timing.py shebang diff --git a/tests/utils/shippable/aws.sh b/tests/utils/shippable/aws.sh deleted file mode 100755 index d76c32282d0..00000000000 --- a/tests/utils/shippable/aws.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail -eux - -declare -a args -IFS='/:' read -ra args <<< "$1" - -cloud="${args[0]}" -python="${args[1]}" -group="${args[2]}" - -target="shippable/${cloud}/group${group}/" - -stage="${S:-prod}" - -# shellcheck disable=SC2086 -ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \ - --remote-terminate always --remote-stage "${stage}" \ - --docker --python "${python}" diff --git a/tests/utils/shippable/check_matrix.py b/tests/utils/shippable/check_matrix.py deleted file mode 100755 index 2a9aa67410a..00000000000 --- a/tests/utils/shippable/check_matrix.py +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env python -"""Verify the currently executing Shippable test matrix matches the one defined in the "shippable.yml" file.""" -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import datetime -import json -import os -import re -import sys -import time - -try: - from typing import NoReturn -except ImportError: - NoReturn = None - -try: - # noinspection PyCompatibility - from urllib2 import urlopen # pylint: disable=ansible-bad-import-from -except ImportError: - # noinspection PyCompatibility - from urllib.request import urlopen - - -def main(): # type: () -> None - """Main entry point.""" - repo_full_name = os.environ['REPO_FULL_NAME'] - required_repo_full_name = 'ansible-collections/community.aws' - - if repo_full_name != required_repo_full_name: - sys.stderr.write('Skipping matrix check on repo "%s" which is not "%s".\n' % (repo_full_name, required_repo_full_name)) - return - - with open('shippable.yml', 'rb') as yaml_file: - yaml = yaml_file.read().decode('utf-8').splitlines() - - defined_matrix = [match.group(1) for match in [re.search(r'^ *- env: T=(.*)$', line) for line in yaml] if match and match.group(1) != 'none'] - - if not defined_matrix: - fail('No matrix entries found in the "shippable.yml" file.', - 'Did you modify the "shippable.yml" file?') - - run_id = os.environ['SHIPPABLE_BUILD_ID'] - sleep = 1 - jobs = [] - - for attempts_remaining in range(4, -1, -1): - try: - jobs = json.loads(urlopen('https://api.shippable.com/jobs?runIds=%s' % run_id).read()) - - if not isinstance(jobs, list): - raise Exception('Shippable run %s data is not a list.' % run_id) - - break - except Exception as ex: - if not attempts_remaining: - fail('Unable to retrieve Shippable run %s matrix.' % run_id, - str(ex)) - - sys.stderr.write('Unable to retrieve Shippable run %s matrix: %s\n' % (run_id, ex)) - sys.stderr.write('Trying again in %d seconds...\n' % sleep) - time.sleep(sleep) - sleep *= 2 - - if len(jobs) != len(defined_matrix): - if len(jobs) == 1: - hint = '\n\nMake sure you do not use the "Rebuild with SSH" option.' - else: - hint = '' - - fail('Shippable run %s has %d jobs instead of the expected %d jobs.' % (run_id, len(jobs), len(defined_matrix)), - 'Try re-running the entire matrix.%s' % hint) - - actual_matrix = dict((job.get('jobNumber'), dict(tuple(line.split('=', 1)) for line in job.get('env', [])).get('T', '')) for job in jobs) - errors = [(job_number, test, actual_matrix.get(job_number)) for job_number, test in enumerate(defined_matrix, 1) if actual_matrix.get(job_number) != test] - - if len(errors): - error_summary = '\n'.join('Job %s expected "%s" but found "%s" instead.' % (job_number, expected, actual) for job_number, expected, actual in errors) - - fail('Shippable run %s has a job matrix mismatch.' % run_id, - 'Try re-running the entire matrix.\n\n%s' % error_summary) - - -def fail(message, output): # type: (str, str) -> NoReturn - # Include a leading newline to improve readability on Shippable "Tests" tab. - # Without this, the first line becomes indented. - output = '\n' + output.strip() - - timestamp = datetime.datetime.utcnow().replace(microsecond=0).isoformat() - - # hack to avoid requiring junit-xml, which isn't pre-installed on Shippable outside our test containers - xml = ''' - - -\t -\t\t -\t\t\t%s -\t\t -\t - -''' % (timestamp, message, output) - - path = 'shippable/testresults/check-matrix.xml' - dir_path = os.path.dirname(path) - - if not os.path.exists(dir_path): - os.makedirs(dir_path) - - with open(path, 'w') as junit_fd: - junit_fd.write(xml.lstrip()) - - sys.stderr.write(message + '\n') - sys.stderr.write(output + '\n') - - sys.exit(1) - - -if __name__ == '__main__': - main() diff --git a/tests/utils/shippable/sanity.sh b/tests/utils/shippable/sanity.sh deleted file mode 100755 index dd1e68b9357..00000000000 --- a/tests/utils/shippable/sanity.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail -eux - -if [ "${BASE_BRANCH:-}" ]; then - base_branch="origin/${BASE_BRANCH}" -else - base_branch="" -fi - -# shellcheck disable=SC2086 -ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \ - --docker --base-branch "${base_branch}" \ - --allow-disabled diff --git a/tests/utils/shippable/shippable.sh b/tests/utils/shippable/shippable.sh deleted file mode 100755 index aac0b7ba823..00000000000 --- a/tests/utils/shippable/shippable.sh +++ /dev/null @@ -1,219 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail -eux - -declare -a args -IFS='/:' read -ra args <<< "$1" - -ansible_version="${args[0]}" -script="${args[1]}" - -function join { - local IFS="$1"; - shift; - echo "$*"; -} - -test="$(join / "${args[@]:1}")" - -docker images ansible/ansible -docker images quay.io/ansible/* -docker ps - -for container in $(docker ps --format '{{.Image}} {{.ID}}' | grep -v -e '^drydock/' | sed 's/^.* //'); do - docker rm -f "${container}" || true # ignore errors -done - -docker ps - -if [ -d /home/shippable/cache/ ]; then - ls -la /home/shippable/cache/ -fi - -command -v python -python -V - -function retry -{ - # shellcheck disable=SC2034 - for repetition in 1 2 3; do - set +e - "$@" - result=$? - set -e - if [ ${result} == 0 ]; then - return ${result} - fi - echo "@* -> ${result}" - done - echo "Command '@*' failed 3 times!" - exit 1 -} - -command -v pip -pip --version -pip list --disable-pip-version-check -if [ "${ansible_version}" == "devel" ]; then - retry pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check -else - retry pip install "https://github.com/ansible/ansible/archive/stable-${ansible_version}.tar.gz" --disable-pip-version-check -fi - -if [ "${SHIPPABLE_BUILD_ID:-}" ]; then - export ANSIBLE_COLLECTIONS_PATHS="${HOME}/.ansible" - SHIPPABLE_RESULT_DIR="$(pwd)/shippable" - TEST_DIR="${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/aws" - mkdir -p "${TEST_DIR}" - cp -aT "${SHIPPABLE_BUILD_DIR}" "${TEST_DIR}" - cd "${TEST_DIR}" -else - export ANSIBLE_COLLECTIONS_PATHS="${PWD}/../../../" -fi - -# Install amazon.aws directly from GitHub (rather than Galaxy) so we always run against the latest version -mkdir -p "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/amazon" -git clone https://github.com/ansible-collections/amazon.aws "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/amazon/aws" - -# To avoid accidently adding new dependencies, only install what's needed when it's needed -if [ "${script}" != "sanity" ] || [ "${test}" == "sanity/extra" ]; then - # Nothing further should be added to this list. - # This is to prevent modules or plugins in this collection having a runtime dependency on other collections. - retry ansible-galaxy -vvv collection install community.internal_test_tools -fi - -if [ "${script}" != "sanity" ] && [ "${script}" != "units" ]; then - # To prevent Python dependencies on other collections only install other collections for integration tests - retry ansible-galaxy -vvv collection install community.general - retry ansible-galaxy -vvv collection install ansible.netcommon - retry ansible-galaxy -vvv collection install community.crypto -fi - -export PYTHONIOENCODING='utf-8' - -if [ "${JOB_TRIGGERED_BY_NAME:-}" == "nightly-trigger" ]; then - COVERAGE=yes - COMPLETE=yes -fi - -if [ -n "${COVERAGE:-}" ]; then - # on-demand coverage reporting triggered by setting the COVERAGE environment variable to a non-empty value - export COVERAGE="--coverage" -elif [[ "${COMMIT_MESSAGE}" =~ ci_coverage ]]; then - # on-demand coverage reporting triggered by having 'ci_coverage' in the latest commit message - export COVERAGE="--coverage" -else - # on-demand coverage reporting disabled (default behavior, always-on coverage reporting remains enabled) - export COVERAGE="--coverage-check" -fi - -if [ -n "${COMPLETE:-}" ]; then - # disable change detection triggered by setting the COMPLETE environment variable to a non-empty value - export CHANGED="" -elif [[ "${COMMIT_MESSAGE}" =~ ci_complete ]]; then - # disable change detection triggered by having 'ci_complete' in the latest commit message - export CHANGED="" -else - # enable change detection (default behavior) - export CHANGED="--changed" -fi - -if [ "${IS_PULL_REQUEST:-}" == "true" ]; then - # run unstable tests which are targeted by focused changes on PRs - export UNSTABLE="--allow-unstable-changed" -else - # do not run unstable tests outside PRs - export UNSTABLE="" -fi - -# remove empty core/extras module directories from PRs created prior to the repo-merge -find plugins -type d -empty -print -delete - -function cleanup -{ - # for complete on-demand coverage generate a report for all files with no coverage on the "sanity/5" job so we only have one copy - if [ "${COVERAGE}" == "--coverage" ] && [ "${CHANGED}" == "" ] && [ "${test}" == "sanity/5" ]; then - stub="--stub" - # trigger coverage reporting for stubs even if no other coverage data exists - mkdir -p tests/output/coverage/ - else - stub="" - fi - - if [ -d tests/output/coverage/ ]; then - if find tests/output/coverage/ -mindepth 1 -name '.*' -prune -o -print -quit | grep -q .; then - process_coverage='yes' # process existing coverage files - elif [ "${stub}" ]; then - process_coverage='yes' # process coverage when stubs are enabled - else - process_coverage='' - fi - - if [ "${process_coverage}" ]; then - # use python 3.7 for coverage to avoid running out of memory during coverage xml processing - # only use it for coverage to avoid the additional overhead of setting up a virtual environment for a potential no-op job - virtualenv --python /usr/bin/python3.7 ~/ansible-venv - set +ux - . ~/ansible-venv/bin/activate - set -ux - - # shellcheck disable=SC2086 - ansible-test coverage xml --color -v --requirements --group-by command --group-by version ${stub:+"$stub"} - cp -a tests/output/reports/coverage=*.xml "$SHIPPABLE_RESULT_DIR/codecoverage/" - - if [ "${ansible_version}" != "2.9" ]; then - # analyze and capture code coverage aggregated by integration test target - ansible-test coverage analyze targets generate -v "$SHIPPABLE_RESULT_DIR/testresults/coverage-analyze-targets.json" - fi - - # upload coverage report to codecov.io only when using complete on-demand coverage - if [ "${COVERAGE}" == "--coverage" ] && [ "${CHANGED}" == "" ]; then - for file in tests/output/reports/coverage=*.xml; do - flags="${file##*/coverage=}" - flags="${flags%-powershell.xml}" - flags="${flags%.xml}" - # remove numbered component from stub files when converting to tags - flags="${flags//stub-[0-9]*/stub}" - flags="${flags//=/,}" - flags="${flags//[^a-zA-Z0-9_,]/_}" - - bash <(curl -s https://ansible-ci-files.s3.us-east-1.amazonaws.com/codecov/codecov.sh) \ - -f "${file}" \ - -F "${flags}" \ - -n "${test}" \ - -t 8a86e979-f37b-4d5d-95a4-960c280d5eaa \ - -X coveragepy \ - -X gcov \ - -X fix \ - -X search \ - -X xcode \ - || echo "Failed to upload code coverage report to codecov.io: ${file}" - done - fi - fi - fi - - if [ -d tests/output/junit/ ]; then - cp -aT tests/output/junit/ "$SHIPPABLE_RESULT_DIR/testresults/" - fi - - if [ -d tests/output/data/ ]; then - cp -a tests/output/data/ "$SHIPPABLE_RESULT_DIR/testresults/" - fi - - if [ -d tests/output/bot/ ]; then - cp -aT tests/output/bot/ "$SHIPPABLE_RESULT_DIR/testresults/" - fi -} - -if [ "${SHIPPABLE_BUILD_ID:-}" ]; then trap cleanup EXIT; fi - -if [[ "${COVERAGE:-}" == "--coverage" ]]; then - timeout=60 -else - timeout=45 -fi - -ansible-test env --dump --show --timeout "${timeout}" --color -v - -if [ "${SHIPPABLE_BUILD_ID:-}" ]; then "tests/utils/shippable/check_matrix.py"; fi -"tests/utils/shippable/${script}.sh" "${test}" diff --git a/tests/utils/shippable/timing.py b/tests/utils/shippable/timing.py deleted file mode 100755 index fb538271b84..00000000000 --- a/tests/utils/shippable/timing.py +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env python3.7 -from __future__ import (absolute_import, division, print_function) -__metaclass__ = type - -import sys -import time - -start = time.time() - -sys.stdin.reconfigure(errors='surrogateescape') -sys.stdout.reconfigure(errors='surrogateescape') - -for line in sys.stdin: - seconds = time.time() - start - sys.stdout.write('%02d:%02d %s' % (seconds // 60, seconds % 60, line)) - sys.stdout.flush() diff --git a/tests/utils/shippable/timing.sh b/tests/utils/shippable/timing.sh deleted file mode 100755 index 77e25783046..00000000000 --- a/tests/utils/shippable/timing.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail -eu - -"$@" 2>&1 | "$(dirname "$0")/timing.py" diff --git a/tests/utils/shippable/units.sh b/tests/utils/shippable/units.sh deleted file mode 100755 index dc115dec15e..00000000000 --- a/tests/utils/shippable/units.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env bash - -set -o pipefail -eux - -declare -a args -IFS='/:' read -ra args <<< "$1" - -version="${args[1]}" - -# shellcheck disable=SC2086 -ansible-test units --color -v --docker default --python "${version}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \ From 9de26105245f370ea8d55dea8688fd7b60bc973f Mon Sep 17 00:00:00 2001 From: jillr Date: Thu, 20 May 2021 22:32:03 +0000 Subject: [PATCH 02/16] Use md5 hashes for unique prefixes instead of shippable regex --- tests/integration/targets/aws_codebuild/defaults/main.yml | 7 ++----- .../integration/targets/aws_codepipeline/defaults/main.yml | 7 ++----- tests/integration/targets/ec2_eip/defaults/main.yml | 4 ++-- tests/integration/targets/lambda/defaults/main.yml | 7 ++----- tests/integration/targets/lambda_alias/defaults/main.yml | 7 ++----- tests/integration/targets/lambda_policy/defaults/main.yml | 7 ++----- .../targets/s3_bucket_notification/defaults/main.yml | 7 ++----- tests/integration/targets/sns_topic/defaults/main.yml | 7 ++----- 8 files changed, 16 insertions(+), 37 deletions(-) diff --git a/tests/integration/targets/aws_codebuild/defaults/main.yml b/tests/integration/targets/aws_codebuild/defaults/main.yml index a36eb3de720..8887815ff93 100644 --- a/tests/integration/targets/aws_codebuild/defaults/main.yml +++ b/tests/integration/targets/aws_codebuild/defaults/main.yml @@ -2,9 +2,6 @@ # defaults file for aws_codebuild # IAM role names have to be less than 64 characters -# The 8 digit identifier at the end of resource_prefix helps determine during -# which test something was created and allows tests to be run in parallel -# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases -# we need both sets of digits to keep the resource name unique -unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +# we hash the resource_prefix to get a shorter, unique string +unique_id: "{{ resource_prefix | hash('md5') }}" iam_role_name: "ansible-test-sts-{{ unique_id }}-codebuild-service-role" diff --git a/tests/integration/targets/aws_codepipeline/defaults/main.yml b/tests/integration/targets/aws_codepipeline/defaults/main.yml index 5f735ba6df9..1b444306532 100644 --- a/tests/integration/targets/aws_codepipeline/defaults/main.yml +++ b/tests/integration/targets/aws_codepipeline/defaults/main.yml @@ -4,9 +4,6 @@ codepipeline_name: "{{ resource_prefix }}-test-codepipeline" # IAM role names have to be less than 64 characters -# The 8 digit identifier at the end of resource_prefix helps determine during -# which test something was created and allows tests to be run in parallel -# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases -# we need both sets of digits to keep the resource name unique -unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +# we hash the resource_prefix to get a shorter, unique string +unique_id: "{{ resource_prefix | hash('md5') }}" codepipeline_service_role_name: "ansible-test-sts-{{ unique_id }}-codepipeline-role" diff --git a/tests/integration/targets/ec2_eip/defaults/main.yml b/tests/integration/targets/ec2_eip/defaults/main.yml index 8986714b6c8..bbaeb04820c 100644 --- a/tests/integration/targets/ec2_eip/defaults/main.yml +++ b/tests/integration/targets/ec2_eip/defaults/main.yml @@ -1,5 +1,5 @@ --- -# VPCs are identified by the CIDR. Don't hard code the CIDR. shippable will -# run multiple copies of the test concurrently (Python 2.x and Python 3.x) +# VPCs are identified by the CIDR. Don't hard code the CIDR. CI may +# run multiple copies of the test concurrently. vpc_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.0.0/16' subnet_cidr: '10.{{ 256 | random(seed=resource_prefix) }}.42.0/24' diff --git a/tests/integration/targets/lambda/defaults/main.yml b/tests/integration/targets/lambda/defaults/main.yml index ea29794efe0..6ddc88d7198 100644 --- a/tests/integration/targets/lambda/defaults/main.yml +++ b/tests/integration/targets/lambda/defaults/main.yml @@ -2,9 +2,6 @@ # defaults file for lambda integration test lambda_function_name: '{{ resource_prefix }}' # IAM role names have to be less than 64 characters -# The 8 digit identifier at the end of resource_prefix helps determine during -# which test something was created and allows tests to be run in parallel -# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases -# we need both sets of digits to keep the resource name unique -unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +# we hash the resource_prefix to get a shorter, unique string +unique_id: "{{ resource_prefix | hash('md5') }}" lambda_role_name: 'ansible-test-{{ unique_id }}-lambda' diff --git a/tests/integration/targets/lambda_alias/defaults/main.yml b/tests/integration/targets/lambda_alias/defaults/main.yml index ea29794efe0..6ddc88d7198 100644 --- a/tests/integration/targets/lambda_alias/defaults/main.yml +++ b/tests/integration/targets/lambda_alias/defaults/main.yml @@ -2,9 +2,6 @@ # defaults file for lambda integration test lambda_function_name: '{{ resource_prefix }}' # IAM role names have to be less than 64 characters -# The 8 digit identifier at the end of resource_prefix helps determine during -# which test something was created and allows tests to be run in parallel -# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases -# we need both sets of digits to keep the resource name unique -unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +# we hash the resource_prefix to get a shorter, unique string +unique_id: "{{ resource_prefix | hash('md5') }}" lambda_role_name: 'ansible-test-{{ unique_id }}-lambda' diff --git a/tests/integration/targets/lambda_policy/defaults/main.yml b/tests/integration/targets/lambda_policy/defaults/main.yml index 5bcb2027367..2919b66e77a 100644 --- a/tests/integration/targets/lambda_policy/defaults/main.yml +++ b/tests/integration/targets/lambda_policy/defaults/main.yml @@ -2,9 +2,6 @@ # defaults file for lambda_policy integration test lambda_function_name: '{{ resource_prefix }}-api-endpoint' # IAM role names have to be less than 64 characters -# The 8 digit identifier at the end of resource_prefix helps determine during -# which test something was created and allows tests to be run in parallel -# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases -# we need both sets of digits to keep the resource name unique -unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +# we hash the resource_prefix to get a shorter, unique string +unique_id: "{{ resource_prefix | hash('md5') }}" lambda_role_name: 'ansible-test-{{ unique_id }}-lambda-policy' diff --git a/tests/integration/targets/s3_bucket_notification/defaults/main.yml b/tests/integration/targets/s3_bucket_notification/defaults/main.yml index ad2a4c68f0c..2c109612bcb 100644 --- a/tests/integration/targets/s3_bucket_notification/defaults/main.yml +++ b/tests/integration/targets/s3_bucket_notification/defaults/main.yml @@ -2,9 +2,6 @@ # defaults file for s3_bucket_notifications integration test lambda_function_name: '{{ resource_prefix }}' # IAM role names have to be less than 64 characters -# The 8 digit identifier at the end of resource_prefix helps determine during -# which test something was created and allows tests to be run in parallel -# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases -# we need both sets of digits to keep the resource name unique -unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +# we hash the resource_prefix to get a shorter, unique string +unique_id: "{{ resource_prefix | hash('md5') }}" lambda_role_name: 'ansible-test-{{ unique_id }}-s3-notifications' diff --git a/tests/integration/targets/sns_topic/defaults/main.yml b/tests/integration/targets/sns_topic/defaults/main.yml index 4082236c73b..19d84a3c5ea 100644 --- a/tests/integration/targets/sns_topic/defaults/main.yml +++ b/tests/integration/targets/sns_topic/defaults/main.yml @@ -7,9 +7,6 @@ sns_topic_third_party_region: "{{ sns_topic_third_party_topic_arn.split(':')[3] sns_topic_lambda_function: "sns_topic_lambda" sns_topic_lambda_name: "{{ resource_prefix }}-{{ sns_topic_lambda_function }}" # IAM role names have to be less than 64 characters -# The 8 digit identifier at the end of resource_prefix helps determine during -# which test something was created and allows tests to be run in parallel -# Shippable resource_prefixes are in the format shippable-123456-123, so in those cases -# we need both sets of digits to keep the resource name unique -unique_id: "{{ resource_prefix | regex_search('(\\d+-?)(\\d+)$') }}" +# we hash the resource_prefix to get a shorter, unique string +unique_id: "{{ resource_prefix | hash('md5') }}" sns_topic_lambda_role: "ansible-test-{{ unique_id }}-sns-lambda" From 311cd824eacf27aa77b075a073b44c42d8101239 Mon Sep 17 00:00:00 2001 From: jillr Date: Thu, 3 Jun 2021 20:22:54 +0000 Subject: [PATCH 03/16] update 2.12 file --- tests/sanity/ignore-2.12.txt | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/sanity/ignore-2.12.txt b/tests/sanity/ignore-2.12.txt index 0d5dfd22552..0fa705a0845 100644 --- a/tests/sanity/ignore-2.12.txt +++ b/tests/sanity/ignore-2.12.txt @@ -2186,5 +2186,3 @@ plugins/modules/wafv2_web_acl_info.py import-3.6!skip plugins/modules/wafv2_web_acl_info.py import-3.7!skip plugins/modules/wafv2_web_acl_info.py metaclass-boilerplate!skip tests/sanity/refresh_ignore_files shebang!skip -tests/utils/shippable/check_matrix.py replace-urlopen -tests/utils/shippable/timing.py shebang From fa93ddf88e426ff27922036c32900e727914a043 Mon Sep 17 00:00:00 2001 From: jillr Date: Mon, 7 Jun 2021 16:43:36 +0000 Subject: [PATCH 04/16] remove overlooked line --- tests/sanity/ignore-2.10.txt | 2 -- tests/sanity/ignore-2.11.txt | 2 -- tests/sanity/ignore-2.9.txt | 2 -- 3 files changed, 6 deletions(-) diff --git a/tests/sanity/ignore-2.10.txt b/tests/sanity/ignore-2.10.txt index b808f6884c0..8d2d57ecd67 100644 --- a/tests/sanity/ignore-2.10.txt +++ b/tests/sanity/ignore-2.10.txt @@ -2184,5 +2184,3 @@ plugins/modules/wafv2_web_acl_info.py import-3.6!skip plugins/modules/wafv2_web_acl_info.py import-3.7!skip plugins/modules/wafv2_web_acl_info.py metaclass-boilerplate!skip tests/sanity/refresh_ignore_files shebang!skip -tests/utils/shippable/check_matrix.py replace-urlopen -tests/utils/shippable/timing.py shebang diff --git a/tests/sanity/ignore-2.11.txt b/tests/sanity/ignore-2.11.txt index 0d5dfd22552..0fa705a0845 100644 --- a/tests/sanity/ignore-2.11.txt +++ b/tests/sanity/ignore-2.11.txt @@ -2186,5 +2186,3 @@ plugins/modules/wafv2_web_acl_info.py import-3.6!skip plugins/modules/wafv2_web_acl_info.py import-3.7!skip plugins/modules/wafv2_web_acl_info.py metaclass-boilerplate!skip tests/sanity/refresh_ignore_files shebang!skip -tests/utils/shippable/check_matrix.py replace-urlopen -tests/utils/shippable/timing.py shebang diff --git a/tests/sanity/ignore-2.9.txt b/tests/sanity/ignore-2.9.txt index 72e6f6bfdf9..67740d70a56 100644 --- a/tests/sanity/ignore-2.9.txt +++ b/tests/sanity/ignore-2.9.txt @@ -2228,5 +2228,3 @@ plugins/modules/wafv2_web_acl_info.py import-3.6!skip plugins/modules/wafv2_web_acl_info.py import-3.7!skip plugins/modules/wafv2_web_acl_info.py metaclass-boilerplate!skip tests/sanity/refresh_ignore_files shebang!skip -tests/utils/shippable/check_matrix.py replace-urlopen -tests/utils/shippable/timing.py shebang From ef74d3c39ca21c8fc746672211c60e942efa0dd1 Mon Sep 17 00:00:00 2001 From: jillr Date: Tue, 8 Jun 2021 17:26:40 +0000 Subject: [PATCH 05/16] Shorten some role names in tests --- tests/integration/targets/aws_codebuild/defaults/main.yml | 2 +- tests/integration/targets/aws_codepipeline/defaults/main.yml | 4 ++-- .../integration/targets/aws_s3_bucket_info/defaults/main.yml | 5 +++-- .../integration/targets/aws_ses_rule_set/defaults/main.yaml | 4 ++-- .../aws_step_functions_state_machine/defaults/main.yml | 5 +++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/tests/integration/targets/aws_codebuild/defaults/main.yml b/tests/integration/targets/aws_codebuild/defaults/main.yml index 8887815ff93..67c13956d0a 100644 --- a/tests/integration/targets/aws_codebuild/defaults/main.yml +++ b/tests/integration/targets/aws_codebuild/defaults/main.yml @@ -3,5 +3,5 @@ # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string -unique_id: "{{ resource_prefix | hash('md5') }}" +unique_id: "{{ resource_prefix | hash('md5') | truncate(8, True, '') }}" iam_role_name: "ansible-test-sts-{{ unique_id }}-codebuild-service-role" diff --git a/tests/integration/targets/aws_codepipeline/defaults/main.yml b/tests/integration/targets/aws_codepipeline/defaults/main.yml index 1b444306532..1551d8a3b64 100644 --- a/tests/integration/targets/aws_codepipeline/defaults/main.yml +++ b/tests/integration/targets/aws_codepipeline/defaults/main.yml @@ -1,9 +1,9 @@ --- # defaults file for aws_codepipeline -codepipeline_name: "{{ resource_prefix }}-test-codepipeline" +codepipeline_name: "{{ resource_prefix | hash('md5') }}-test-codepipeline" # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string -unique_id: "{{ resource_prefix | hash('md5') }}" +unique_id: "{{ resource_prefix | hash('md5') | truncate(6, True, '') }}" codepipeline_service_role_name: "ansible-test-sts-{{ unique_id }}-codepipeline-role" diff --git a/tests/integration/targets/aws_s3_bucket_info/defaults/main.yml b/tests/integration/targets/aws_s3_bucket_info/defaults/main.yml index 4f4376a251c..5ba35b74952 100644 --- a/tests/integration/targets/aws_s3_bucket_info/defaults/main.yml +++ b/tests/integration/targets/aws_s3_bucket_info/defaults/main.yml @@ -1,6 +1,7 @@ --- name_pattern: "testbucket-ansible-integration" +unique_id: "{{ resource_prefix | hash('md5') | truncate(24, True, '') }}" testing_buckets: - - "{{ resource_prefix }}-{{ name_pattern }}-1" - - "{{ resource_prefix }}-{{ name_pattern }}-2" + - "{{ unique_id }}-{{ name_pattern }}-1" + - "{{ unique_id }}-{{ name_pattern }}-2" diff --git a/tests/integration/targets/aws_ses_rule_set/defaults/main.yaml b/tests/integration/targets/aws_ses_rule_set/defaults/main.yaml index f9fecf7bdf4..36351dfc9d6 100644 --- a/tests/integration/targets/aws_ses_rule_set/defaults/main.yaml +++ b/tests/integration/targets/aws_ses_rule_set/defaults/main.yaml @@ -1,6 +1,6 @@ --- -default_rule_set: "{{ resource_prefix }}-default-rule-set" -second_rule_set: "{{ resource_prefix }}-second-rule-set" +default_rule_set: "{{ resource_prefix | hash('md5') }}-default-rule-set" +second_rule_set: "{{ resource_prefix | hash('md5') }}-second-rule-set" # See comment in obtain-lock.yaml for definitions of these variables max_obtain_lock_attempts: 10 diff --git a/tests/integration/targets/aws_step_functions_state_machine/defaults/main.yml b/tests/integration/targets/aws_step_functions_state_machine/defaults/main.yml index d3dea56cd72..b8d8d85dd1a 100644 --- a/tests/integration/targets/aws_step_functions_state_machine/defaults/main.yml +++ b/tests/integration/targets/aws_step_functions_state_machine/defaults/main.yml @@ -1,4 +1,5 @@ # the random_num is generated in a set_fact task at the start of the testsuite -state_machine_name: "{{ resource_prefix }}_step_function_{{ random_num }}" -step_functions_role_name: "ansible-test-{{ resource_prefix }}-step-function" +state_machine_name: "{{ resource_prefix | hash('md5') }}_step_function_{{ random_num }}" +unique_id: "{{ resource_prefix | hash('md5') }}" +step_functions_role_name: "ansible-test-{{ unique_id }}-step-function" execution_name: "{{ resource_prefix }}_sfn_execution" From 11ab73049ea0e09536f518b0756426e0a30db261 Mon Sep 17 00:00:00 2001 From: jillr Date: Mon, 14 Jun 2021 19:59:01 +0000 Subject: [PATCH 06/16] More resource name shortening --- tests/integration/targets/redshift/defaults/main.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/targets/redshift/defaults/main.yml b/tests/integration/targets/redshift/defaults/main.yml index f1cd2cb12a0..658484e1fed 100644 --- a/tests/integration/targets/redshift/defaults/main.yml +++ b/tests/integration/targets/redshift/defaults/main.yml @@ -1,6 +1,7 @@ --- # defaults file for test_redshift -redshift_cluster_name: '{{ resource_prefix }}' +unique_id: "{{ resource_prefix | hash('md5') }}" +redshift_cluster_name: '{{ unique_id }}' reshift_master_password: "th1s_is_A_test" redshift_master_username: "master_user" node_type: "dc2.large" From b79f1fae26fba3e4e36363a0025e0716cf899e50 Mon Sep 17 00:00:00 2001 From: jillr Date: Wed, 16 Jun 2021 16:56:05 +0000 Subject: [PATCH 07/16] Fix resource prefixes for s3 tests --- .../s3_bucket_notification/defaults/main.yml | 2 +- .../targets/s3_lifecycle/defaults/main.yml | 3 ++- .../targets/s3_logging/defaults/main.yml | 7 +++--- .../defaults/main.yml | 3 ++- .../targets/s3_sync/defaults/main.yml | 3 +++ .../targets/s3_sync/tasks/main.yml | 22 +++++++++---------- 6 files changed, 23 insertions(+), 17 deletions(-) create mode 100644 tests/integration/targets/s3_sync/defaults/main.yml diff --git a/tests/integration/targets/s3_bucket_notification/defaults/main.yml b/tests/integration/targets/s3_bucket_notification/defaults/main.yml index 2c109612bcb..8884e335398 100644 --- a/tests/integration/targets/s3_bucket_notification/defaults/main.yml +++ b/tests/integration/targets/s3_bucket_notification/defaults/main.yml @@ -3,5 +3,5 @@ lambda_function_name: '{{ resource_prefix }}' # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string -unique_id: "{{ resource_prefix | hash('md5') }}" +unique_id: "{{ resource_prefix | hash('md5') |truncate(8, True, '') }}" lambda_role_name: 'ansible-test-{{ unique_id }}-s3-notifications' diff --git a/tests/integration/targets/s3_lifecycle/defaults/main.yml b/tests/integration/targets/s3_lifecycle/defaults/main.yml index 8c5fc34f3e9..2783b0e9ec0 100644 --- a/tests/integration/targets/s3_lifecycle/defaults/main.yml +++ b/tests/integration/targets/s3_lifecycle/defaults/main.yml @@ -1 +1,2 @@ -bucket_name: '{{ resource_prefix }}-s3-lifecycle' +unique_id: "{{ resource_prefix | hash('md5') |truncate(8, True, '') }}" +bucket_name: '{{ unique_id }}-s3-lifecycle' diff --git a/tests/integration/targets/s3_logging/defaults/main.yml b/tests/integration/targets/s3_logging/defaults/main.yml index c2b7dda5634..7b46f93a1d5 100644 --- a/tests/integration/targets/s3_logging/defaults/main.yml +++ b/tests/integration/targets/s3_logging/defaults/main.yml @@ -1,4 +1,5 @@ --- -test_bucket: '{{ resource_prefix }}-s3-logging' -log_bucket_1: '{{ resource_prefix }}-logs-1' -log_bucket_2: '{{ resource_prefix }}-logs-2' +unique_id: "{{ resource_prefix | hash('md5') |truncate(8, True, '') }}" +test_bucket: '{{ unique_id }}-s3-logging' +log_bucket_1: '{{ unique_id }}-logs-1' +log_bucket_2: '{{ unique_id }}-logs-2' diff --git a/tests/integration/targets/s3_metrics_configuration/defaults/main.yml b/tests/integration/targets/s3_metrics_configuration/defaults/main.yml index 844e5cc2c71..cb97ba137db 100644 --- a/tests/integration/targets/s3_metrics_configuration/defaults/main.yml +++ b/tests/integration/targets/s3_metrics_configuration/defaults/main.yml @@ -1,2 +1,3 @@ --- -test_bucket: '{{ resource_prefix }}-testbucket' +unique_id: "{{ resource_prefix | hash('md5') |truncate(8, True, '') }}" +test_bucket: '{{ unique_id }}-testbucket' diff --git a/tests/integration/targets/s3_sync/defaults/main.yml b/tests/integration/targets/s3_sync/defaults/main.yml new file mode 100644 index 00000000000..3455994493a --- /dev/null +++ b/tests/integration/targets/s3_sync/defaults/main.yml @@ -0,0 +1,3 @@ +unique_id: "{{ resource_prefix | hash('md5') |truncate(8, True, '') }}" +test_bucket: "{{ unique_id }}-testbucket-ansible" +test_bucket_2: "{{ unique_id }}-testbucket-ansible-2" diff --git a/tests/integration/targets/s3_sync/tasks/main.yml b/tests/integration/targets/s3_sync/tasks/main.yml index 4480c9add56..eb72de27251 100644 --- a/tests/integration/targets/s3_sync/tasks/main.yml +++ b/tests/integration/targets/s3_sync/tasks/main.yml @@ -13,14 +13,14 @@ # ============================================================ - name: Create simple s3_bucket s3_bucket: - name: "{{ resource_prefix }}-testbucket-ansible" + name: "{{ test_bucket }}" state: present register: output - assert: that: - output.changed - - output.name == '{{ resource_prefix }}-testbucket-ansible' + - output.name == "{{ test_bucket }}" - not output.requester_pays # ============================================================ - name: Prepare fixtures folder @@ -47,7 +47,7 @@ - name: Sync files with remote bucket s3_sync: - bucket: "{{ resource_prefix }}-testbucket-ansible" + bucket: "{{ test_bucket }}" file_root: "{{ output_dir }}/s3_sync" register: output - assert: @@ -57,19 +57,19 @@ # ============================================================ - name: Create a second s3_bucket s3_bucket: - name: "{{ resource_prefix }}-testbucket-ansible-2" + name: "{{ test_bucket_2 }}" state: present register: output - assert: that: - output.changed - - output.name == '{{ resource_prefix }}-testbucket-ansible-2' + - output.name == "{{ test_bucket_2 }}" - not output.requester_pays - name: Sync files with remote bucket using glacier storage class s3_sync: - bucket: "{{ resource_prefix }}-testbucket-ansible-2" + bucket: "{{ test_bucket_2 }}" file_root: "{{ output_dir }}/s3_sync" storage_class: "GLACIER" register: output @@ -81,7 +81,7 @@ - name: Sync files already present s3_sync: - bucket: "{{ resource_prefix }}-testbucket-ansible" + bucket: "{{ test_bucket }}" file_root: "{{ output_dir }}/s3_sync" register: output - assert: @@ -91,7 +91,7 @@ # ============================================================ - name: Sync files with etag calculation s3_sync: - bucket: "{{ resource_prefix }}-testbucket-ansible" + bucket: "{{ test_bucket }}" file_root: "{{ output_dir }}/s3_sync" file_change_strategy: checksum register: output @@ -105,7 +105,7 @@ # ============================================================ - name: all the options s3_sync: - bucket: "{{ resource_prefix }}-testbucket-ansible" + bucket: "{{ test_bucket }}" file_root: "{{ output_dir }}/s3_sync" mime_map: .yml: application/text @@ -130,5 +130,5 @@ force: true ignore_errors: yes with_items: - - "{{ resource_prefix }}-testbucket-ansible" - - "{{ resource_prefix }}-testbucket-ansible-2" + - "{{ test_bucket }}" + - "{{ test_bucket_2 }}" From 77cb6300e8e02326a96d5b5a83364e2fd809d3f2 Mon Sep 17 00:00:00 2001 From: jillr Date: Fri, 18 Jun 2021 22:05:39 +0000 Subject: [PATCH 08/16] Fix up bucket length in s3_bucket_notification --- .../s3_bucket_notification/defaults/main.yml | 2 + .../s3_bucket_notification/tasks/main.yml | 38 +++++++++---------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/tests/integration/targets/s3_bucket_notification/defaults/main.yml b/tests/integration/targets/s3_bucket_notification/defaults/main.yml index 8884e335398..cb05de1adbe 100644 --- a/tests/integration/targets/s3_bucket_notification/defaults/main.yml +++ b/tests/integration/targets/s3_bucket_notification/defaults/main.yml @@ -4,4 +4,6 @@ lambda_function_name: '{{ resource_prefix }}' # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string unique_id: "{{ resource_prefix | hash('md5') |truncate(8, True, '') }}" +bucket_name: '{{ unique_id }}-bucket' +lambda_name: '{{ unique_id }}-lambda' lambda_role_name: 'ansible-test-{{ unique_id }}-s3-notifications' diff --git a/tests/integration/targets/s3_bucket_notification/tasks/main.yml b/tests/integration/targets/s3_bucket_notification/tasks/main.yml index 38ef3bb2c22..fc9b4bb2272 100644 --- a/tests/integration/targets/s3_bucket_notification/tasks/main.yml +++ b/tests/integration/targets/s3_bucket_notification/tasks/main.yml @@ -34,12 +34,12 @@ dest: '{{ output_dir }}/mini_lambda.zip' - name: register bucket s3_bucket: - name: '{{resource_prefix}}-bucket' + name: '{{ bucket_name }}' state: present register: bucket_info - name: register lambda lambda: - name: '{{resource_prefix}}-lambda' + name: '{{ lambda_name }}' state: present role: '{{ lambda_role_name }}' runtime: python3.7 @@ -52,7 +52,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -77,7 +77,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -93,7 +93,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -110,7 +110,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -126,7 +126,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -142,7 +142,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:Post @@ -161,7 +161,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -177,7 +177,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -193,7 +193,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -210,7 +210,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:Post @@ -225,7 +225,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -238,7 +238,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectRestore:Post @@ -255,7 +255,7 @@ s3_bucket_notification: state: present event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' lambda_function_arn: '{{ lambda_info.configuration.function_arn }}' events: - s3:ObjectCreated:* @@ -272,7 +272,7 @@ s3_bucket_notification: state: absent event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' register: result - name: assert result.changed == True assert: @@ -282,7 +282,7 @@ s3_bucket_notification: state: absent event_name: '{{resource_prefix}}-on_file_add_or_remove' - bucket_name: '{{resource_prefix}}-bucket' + bucket_name: '{{ bucket_name }}' register: result - name: assert result.changed == False assert: @@ -291,12 +291,12 @@ always: - name: clean-up bucket s3_bucket: - name: '{{resource_prefix}}-bucket' + name: '{{ bucket_name }}' state: absent ignore_errors: true - name: clean-up lambda lambda: - name: '{{resource_prefix}}-lambda' + name: '{{ lambda_name }}' state: absent ignore_errors: true - name: cleam-up role From d276a6127640d6eddc83295e3f06f882746d9b34 Mon Sep 17 00:00:00 2001 From: jillr Date: Sat, 19 Jun 2021 01:15:38 +0000 Subject: [PATCH 09/16] Fix up lambda tests and more iam roles --- tests/integration/targets/ec2_instance/aliases | 3 --- .../playbooks/roles/elb_lambda_target/defaults/main.yml | 8 ++++---- .../playbooks/roles/elb_target/defaults/main.yml | 8 ++++---- .../targets/elb_target/playbooks/version_fail.yml | 4 ++-- tests/integration/targets/lambda/defaults/main.yml | 2 +- tests/integration/targets/lambda_alias/defaults/main.yml | 2 +- tests/integration/targets/lambda_policy/defaults/main.yml | 2 +- .../integration/targets/sts_assume_role/defaults/main.yml | 2 ++ tests/integration/targets/sts_assume_role/tasks/main.yml | 8 ++++---- 9 files changed, 19 insertions(+), 20 deletions(-) delete mode 100644 tests/integration/targets/ec2_instance/aliases create mode 100644 tests/integration/targets/sts_assume_role/defaults/main.yml diff --git a/tests/integration/targets/ec2_instance/aliases b/tests/integration/targets/ec2_instance/aliases deleted file mode 100644 index 8c28dbb46b0..00000000000 --- a/tests/integration/targets/ec2_instance/aliases +++ /dev/null @@ -1,3 +0,0 @@ -cloud/aws - -ec2_instance_info diff --git a/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml b/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml index 0249499dab3..c2a130e16e0 100644 --- a/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml +++ b/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml @@ -1,5 +1,5 @@ -resource_shortprefix: 'ansible-test-{{ resource_prefix | regex_search("([0-9]+)$") }}' -lambda_role_name: '{{ resource_shortprefix }}-elb-target' +unique_id: "ansible-test-{{ resource_prefix | hash('md5') }}" +lambda_role_name: '{{ unique_id }}-elb-target' #lambda_role_name: '{{ resource_prefix }}-elb-target' -lambda_name: '{{ resource_prefix }}-elb-target' -elb_target_group_name: '{{ resource_shortprefix }}-elb-tg' +lambda_name: '{{ unique_id }}-elb-target' +elb_target_group_name: '{{ unique_id }}-elb-tg' diff --git a/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml b/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml index 731c84d6189..cbae229b17a 100644 --- a/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml +++ b/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml @@ -1,10 +1,10 @@ --- ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2' -resource_shortprefix: 'ansible-test-{{ resource_prefix | regex_search("([0-9]+)$") }}' -tg_name: "{{ resource_shortprefix }}-tg" -tg_tcpudp_name: "{{ resource_shortprefix }}-tgtcpudp" -lb_name: "{{ resource_shortprefix }}-lb" +unique_id: "ansible-test-{{ resource_prefix | hash('md5') }}" +tg_name: "{{ unique_id | truncate(8, True, '') }}-tg" +tg_tcpudp_name: "{{ unique_id }}-tgtcpudp" +lb_name: "{{ unique_id }}-lb" healthy_state: state: 'healthy' diff --git a/tests/integration/targets/elb_target/playbooks/version_fail.yml b/tests/integration/targets/elb_target/playbooks/version_fail.yml index 43cdba85007..9149f593048 100644 --- a/tests/integration/targets/elb_target/playbooks/version_fail.yml +++ b/tests/integration/targets/elb_target/playbooks/version_fail.yml @@ -14,7 +14,7 @@ - name: set up testing target group (type=ip) elb_target_group: state: present - #name: "{{ resource_shortprefix }}-tg" + #name: "{{ unique_id }}-tg" name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tg" health_check_port: 80 protocol: http @@ -37,5 +37,5 @@ - name: Remove testing target group (type=ip) elb_target_group: state: absent - #name: "{{ resource_shortprefix }}-tg" + #name: "{{ unique_id }}-tg" name: "ansible-test-{{ resource_prefix | regex_search('([0-9]+)$') }}-tg" diff --git a/tests/integration/targets/lambda/defaults/main.yml b/tests/integration/targets/lambda/defaults/main.yml index 6ddc88d7198..c48f6972a1f 100644 --- a/tests/integration/targets/lambda/defaults/main.yml +++ b/tests/integration/targets/lambda/defaults/main.yml @@ -1,7 +1,7 @@ --- # defaults file for lambda integration test -lambda_function_name: '{{ resource_prefix }}' # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string unique_id: "{{ resource_prefix | hash('md5') }}" +lambda_function_name: '{{ unique_id }}' lambda_role_name: 'ansible-test-{{ unique_id }}-lambda' diff --git a/tests/integration/targets/lambda_alias/defaults/main.yml b/tests/integration/targets/lambda_alias/defaults/main.yml index 6ddc88d7198..c48f6972a1f 100644 --- a/tests/integration/targets/lambda_alias/defaults/main.yml +++ b/tests/integration/targets/lambda_alias/defaults/main.yml @@ -1,7 +1,7 @@ --- # defaults file for lambda integration test -lambda_function_name: '{{ resource_prefix }}' # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string unique_id: "{{ resource_prefix | hash('md5') }}" +lambda_function_name: '{{ unique_id }}' lambda_role_name: 'ansible-test-{{ unique_id }}-lambda' diff --git a/tests/integration/targets/lambda_policy/defaults/main.yml b/tests/integration/targets/lambda_policy/defaults/main.yml index 2919b66e77a..853bc06fda6 100644 --- a/tests/integration/targets/lambda_policy/defaults/main.yml +++ b/tests/integration/targets/lambda_policy/defaults/main.yml @@ -1,7 +1,7 @@ --- # defaults file for lambda_policy integration test -lambda_function_name: '{{ resource_prefix }}-api-endpoint' # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string unique_id: "{{ resource_prefix | hash('md5') }}" +lambda_function_name: '{{ unique_id }}-api-endpoint' lambda_role_name: 'ansible-test-{{ unique_id }}-lambda-policy' diff --git a/tests/integration/targets/sts_assume_role/defaults/main.yml b/tests/integration/targets/sts_assume_role/defaults/main.yml new file mode 100644 index 00000000000..1287fe1f5b9 --- /dev/null +++ b/tests/integration/targets/sts_assume_role/defaults/main.yml @@ -0,0 +1,2 @@ +unique_id: "{{ resource_prefix | hash('md5') }}" +iam_role_name: "ansible-test-sts-{{ unique_id }}" diff --git a/tests/integration/targets/sts_assume_role/tasks/main.yml b/tests/integration/targets/sts_assume_role/tasks/main.yml index 4a625a10b6f..be684dcea18 100644 --- a/tests/integration/targets/sts_assume_role/tasks/main.yml +++ b/tests/integration/targets/sts_assume_role/tasks/main.yml @@ -23,7 +23,7 @@ # ============================================================ - name: create test iam role iam_role: - name: "ansible-test-sts-{{ resource_prefix }}" + name: "{{ iam_role_name }}" assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" create_instance_profile: False managed_policy: @@ -278,7 +278,7 @@ 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 }}" - name: "ansible-test-sts-{{ resource_prefix }}" + name: "{{ iam_role_name }}" assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" create_instance_profile: False state: present @@ -297,7 +297,7 @@ 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 }}" - name: "ansible-test-sts-{{ resource_prefix }}-new" + name: "{{ iam_role_name }}-new" assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" state: present register: result @@ -324,7 +324,7 @@ - name: delete test iam role iam_role: - name: "ansible-test-sts-{{ resource_prefix }}" + name: "{{ iam_role_name }}" assume_role_policy_document: "{{ lookup('template','policy.json.j2') }}" delete_instance_profile: True managed_policy: From 3567e8b299c0c000fa53524b9adcaafeff8b47dd Mon Sep 17 00:00:00 2001 From: jillr Date: Mon, 21 Jun 2021 17:33:28 +0000 Subject: [PATCH 10/16] Disable contrib script tests, more resource_prefixes --- .../playbooks/roles/elb_lambda_target/defaults/main.yml | 2 +- tests/integration/targets/script_inventory_ec2/aliases | 4 +++- tests/integration/targets/script_inventory_ec2/ec2.sh | 2 +- tests/integration/targets/script_inventory_ec2/runme.sh | 0 4 files changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 tests/integration/targets/script_inventory_ec2/runme.sh diff --git a/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml b/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml index c2a130e16e0..29ef074106d 100644 --- a/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml +++ b/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml @@ -2,4 +2,4 @@ unique_id: "ansible-test-{{ resource_prefix | hash('md5') }}" lambda_role_name: '{{ unique_id }}-elb-target' #lambda_role_name: '{{ resource_prefix }}-elb-target' lambda_name: '{{ unique_id }}-elb-target' -elb_target_group_name: '{{ unique_id }}-elb-tg' +elb_target_group_name: '{{ unique_id | truncate(8, True, '') }}-elb-tg' diff --git a/tests/integration/targets/script_inventory_ec2/aliases b/tests/integration/targets/script_inventory_ec2/aliases index 9d7098a61e5..87228f92579 100644 --- a/tests/integration/targets/script_inventory_ec2/aliases +++ b/tests/integration/targets/script_inventory_ec2/aliases @@ -1 +1,3 @@ -needs/file/contrib/inventory/ec2.py +needs/file/scripts/inventory/ec2.py +# Unsupported, runme.sh is currently broken, and script is deprecated https://github.com/ansible-collections/community.aws/pull/596 +disabled diff --git a/tests/integration/targets/script_inventory_ec2/ec2.sh b/tests/integration/targets/script_inventory_ec2/ec2.sh index 9ae9dee58ab..9c6c127eb4f 100644 --- a/tests/integration/targets/script_inventory_ec2/ec2.sh +++ b/tests/integration/targets/script_inventory_ec2/ec2.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash # Wrapper to use the correct Python interpreter and support code coverage. -ABS_SCRIPT=$(python -c "import os; print(os.path.abspath('../../../../contrib/inventory/ec2.py'))") +ABS_SCRIPT=$(python -c "import os; print(os.path.abspath('../../../../scripts/inventory/ec2.py'))") cd "${OUTPUT_DIR}" python.py "${ABS_SCRIPT}" "$@" diff --git a/tests/integration/targets/script_inventory_ec2/runme.sh b/tests/integration/targets/script_inventory_ec2/runme.sh old mode 100644 new mode 100755 From dc651e2ad5f861784a47c0ff55ab6daabe234044 Mon Sep 17 00:00:00 2001 From: jillr Date: Mon, 21 Jun 2021 21:42:36 +0000 Subject: [PATCH 11/16] Address review comments --- .../targets/aws_codepipeline/defaults/main.yml | 8 +++----- tests/integration/targets/lambda_alias/defaults/main.yml | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/integration/targets/aws_codepipeline/defaults/main.yml b/tests/integration/targets/aws_codepipeline/defaults/main.yml index 1551d8a3b64..b9ced058ff1 100644 --- a/tests/integration/targets/aws_codepipeline/defaults/main.yml +++ b/tests/integration/targets/aws_codepipeline/defaults/main.yml @@ -1,9 +1,7 @@ --- # defaults file for aws_codepipeline - -codepipeline_name: "{{ resource_prefix | hash('md5') }}-test-codepipeline" - +unique_id: "{{ resource_prefix | hash('md5') }}" +codepipeline_name: "{{ unique_id }}-test-codepipeline" # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string -unique_id: "{{ resource_prefix | hash('md5') | truncate(6, True, '') }}" -codepipeline_service_role_name: "ansible-test-sts-{{ unique_id }}-codepipeline-role" +codepipeline_service_role_name: "ansible-test-sts-{{ unique_id | truncate(6, True, '') }}-codepipeline-role" diff --git a/tests/integration/targets/lambda_alias/defaults/main.yml b/tests/integration/targets/lambda_alias/defaults/main.yml index c48f6972a1f..ec10501685b 100644 --- a/tests/integration/targets/lambda_alias/defaults/main.yml +++ b/tests/integration/targets/lambda_alias/defaults/main.yml @@ -3,5 +3,5 @@ # IAM role names have to be less than 64 characters # we hash the resource_prefix to get a shorter, unique string unique_id: "{{ resource_prefix | hash('md5') }}" -lambda_function_name: '{{ unique_id }}' +lambda_function_name: 'ansible-test-{{ unique_id }}' lambda_role_name: 'ansible-test-{{ unique_id }}-lambda' From 4da76849e86b29c0745dce205971c9f239f6ce1c Mon Sep 17 00:00:00 2001 From: jillr Date: Thu, 24 Jun 2021 21:47:43 +0000 Subject: [PATCH 12/16] Combining async poll with async_status shouldn't be done, and no longer works (ansible/ansible/pull/73760). Remove status checks from lambda tests. --- .../integration/targets/lambda/tasks/main.yml | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/tests/integration/targets/lambda/tasks/main.yml b/tests/integration/targets/lambda/tasks/main.yml index 823f479e893..c48766cd306 100644 --- a/tests/integration/targets/lambda/tasks/main.yml +++ b/tests/integration/targets/lambda/tasks/main.yml @@ -358,21 +358,6 @@ assert: that: - result is not failed - - name: wait for async job 1 - async_status: jid={{ async_1.ansible_job_id }} - register: job_result - until: job_result is finished - retries: 30 - - name: wait for async job 2 - async_status: jid={{ async_1.ansible_job_id }} - register: job_result - until: job_result is finished - retries: 30 - - name: wait for async job 3 - async_status: jid={{ async_3.ansible_job_id }} - register: job_result - until: job_result is finished - retries: 30 - name: parallel lambda deletion 1/4 lambda: name: '{{lambda_function_name}}_1' @@ -404,21 +389,6 @@ assert: that: - result is not failed - - name: wait for async job 1 - async_status: jid={{ async_1.ansible_job_id }} - register: job_result - until: job_result is finished - retries: 30 - - name: wait for async job 2 - async_status: jid={{ async_1.ansible_job_id }} - register: job_result - until: job_result is finished - retries: 30 - - name: wait for async job 3 - async_status: jid={{ async_3.ansible_job_id }} - register: job_result - until: job_result is finished - retries: 30 always: - name: ensure function is absent at end of test From 362f5df64c1dadc2646c1fcf800b9afcb808223b Mon Sep 17 00:00:00 2001 From: jillr Date: Fri, 25 Jun 2021 19:13:27 +0000 Subject: [PATCH 13/16] fix up more resource names --- .../elb_target/playbooks/roles/elb_target/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml b/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml index cbae229b17a..3d2ad095b17 100644 --- a/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml +++ b/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml @@ -3,7 +3,7 @@ ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2' unique_id: "ansible-test-{{ resource_prefix | hash('md5') }}" tg_name: "{{ unique_id | truncate(8, True, '') }}-tg" -tg_tcpudp_name: "{{ unique_id }}-tgtcpudp" +tg_tcpudp_name: "{{ unique_id | truncate(8, True, '') }}-tgtcpudp" lb_name: "{{ unique_id }}-lb" healthy_state: From 8f518812b1ff6746822aa3c5916aedd16e316199 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 25 Jun 2021 10:43:22 +0200 Subject: [PATCH 14/16] prefix redshift cluster names to avoid starting with a number --- tests/integration/targets/redshift/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/redshift/defaults/main.yml b/tests/integration/targets/redshift/defaults/main.yml index 658484e1fed..61d01727e5e 100644 --- a/tests/integration/targets/redshift/defaults/main.yml +++ b/tests/integration/targets/redshift/defaults/main.yml @@ -1,7 +1,7 @@ --- # defaults file for test_redshift unique_id: "{{ resource_prefix | hash('md5') }}" -redshift_cluster_name: '{{ unique_id }}' +redshift_cluster_name: 'ansible-test-{{ unique_id }}' reshift_master_password: "th1s_is_A_test" redshift_master_username: "master_user" node_type: "dc2.large" From 3566961de3007c95ffe6b7b3a77e7f8cf3be08aa Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Fri, 25 Jun 2021 16:57:44 +0200 Subject: [PATCH 15/16] fix syntax error --- .../playbooks/roles/elb_lambda_target/defaults/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml b/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml index 29ef074106d..911e2080e8b 100644 --- a/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml +++ b/tests/integration/targets/elb_target/playbooks/roles/elb_lambda_target/defaults/main.yml @@ -2,4 +2,4 @@ unique_id: "ansible-test-{{ resource_prefix | hash('md5') }}" lambda_role_name: '{{ unique_id }}-elb-target' #lambda_role_name: '{{ resource_prefix }}-elb-target' lambda_name: '{{ unique_id }}-elb-target' -elb_target_group_name: '{{ unique_id | truncate(8, True, '') }}-elb-tg' +elb_target_group_name: "{{ unique_id | truncate(8, True, '') }}-elb-tg" From aa06107aeb166fca37a9e9504ad211e0d099b885 Mon Sep 17 00:00:00 2001 From: Mark Chappell Date: Sat, 26 Jun 2021 14:18:43 +0200 Subject: [PATCH 16/16] Try again with elb_target --- .../elb_target/playbooks/roles/elb_target/defaults/main.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml b/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml index 3d2ad095b17..75204ee0b02 100644 --- a/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml +++ b/tests/integration/targets/elb_target/playbooks/roles/elb_target/defaults/main.yml @@ -1,9 +1,9 @@ --- ec2_ami_name: 'amzn2-ami-hvm-2.0.20190612-x86_64-gp2' -unique_id: "ansible-test-{{ resource_prefix | hash('md5') }}" -tg_name: "{{ unique_id | truncate(8, True, '') }}-tg" -tg_tcpudp_name: "{{ unique_id | truncate(8, True, '') }}-tgtcpudp" +unique_id: "ansible-test-{{ resource_prefix | hash('md5') | truncate(8, True, '') }}" +tg_name: "{{ unique_id }}-tg" +tg_tcpudp_name: "{{ unique_id }}-tgtcpudp" lb_name: "{{ unique_id }}-lb" healthy_state: