From 4078cd54dc739aad29b4092e14904b4cb6d40412 Mon Sep 17 00:00:00 2001 From: Marc Ransome Date: Thu, 20 Jun 2024 08:11:17 +0100 Subject: [PATCH] Abbreviate domains to avoid exceeding character limit --- roles/deploy/tasks/main.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/roles/deploy/tasks/main.yml b/roles/deploy/tasks/main.yml index 00c0523..edb737c 100644 --- a/roles/deploy/tasks/main.yml +++ b/roles/deploy/tasks/main.yml @@ -17,12 +17,13 @@ - scripts_artifact_path is defined and scripts_artifact_path | trim | length > 0 msg: "Required variable(s) empty or undefined" -# The hostname is assumed to be in the format: fil-tuxedo-- +# The hostname is assumed to be in the format: fil-tuxedo--; the environment +# name 'development' is abbreviated to 'dev' to avoid exceeding the domain character limit - name: Set Tuxedo facts for config population set_fact: - tuxedo_domain_id_suffix: "{{ ansible_facts.hostname | regex_replace('^fil-tuxedo-([A-Za-z].*)-(\\d+)$', 'FIL_\\2_\\1_DOM') | upper }}" - tuxedo_logical_machine_id_suffix: "{{ ansible_facts.hostname | regex_replace('^fil-tuxedo-([A-Za-z].*)-(\\d+)$', 'FIL_\\2_\\1_SRV') | upper }}" - tuxedo_local_domain_suffix: "{{ ansible_facts.hostname | regex_replace('^fil-tuxedo-([A-Za-z].*)-(\\d+)$', 'FIL_\\2_\\1_LOD') | upper }}" + tuxedo_domain_id_suffix: "{{ ansible_facts.hostname | regex_replace('development', 'dev') | regex_replace('^fil-tuxedo-([A-Za-z].*)-(\\d+)$', 'FIL_\\2_\\1_DOM') | upper }}" + tuxedo_logical_machine_id_suffix: "{{ ansible_facts.hostname | regex_replace('development', 'dev') | regex_replace('^fil-tuxedo-([A-Za-z].*)-(\\d+)$', 'FIL_\\2_\\1_SRV') | upper }}" + tuxedo_local_domain_suffix: "{{ ansible_facts.hostname | regex_replace('development', 'dev') | regex_replace('^fil-tuxedo-([A-Za-z].*)-(\\d+)$', 'FIL_\\2_\\1_LOD') | upper }}" - name: Set CloudWatch agent facts for config population set_fact: