Skip to content

Commit

Permalink
Shorten some role names in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jillr committed Jun 11, 2021
1 parent ccdfc93 commit 8893fff
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion tests/integration/targets/aws_codebuild/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
4 changes: 2 additions & 2 deletions tests/integration/targets/aws_codepipeline/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -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"
Original file line number Diff line number Diff line change
@@ -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"
4 changes: 2 additions & 2 deletions tests/integration/targets/aws_ses_rule_set/defaults/main.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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"

0 comments on commit 8893fff

Please sign in to comment.