From c35c58389dc0e363386c0ea505181159614954ca Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 1 Sep 2023 15:42:23 -0400 Subject: [PATCH] Use short names in PVC configs --- roles/pvc/templates/pvc/pvcapid.yaml.j2 | 4 ++-- roles/pvc/templates/pvc/pvcnoded.yaml.j2 | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/roles/pvc/templates/pvc/pvcapid.yaml.j2 b/roles/pvc/templates/pvc/pvcapid.yaml.j2 index 800789a..d771e72 100644 --- a/roles/pvc/templates/pvc/pvcapid.yaml.j2 +++ b/roles/pvc/templates/pvc/pvcapid.yaml.j2 @@ -5,7 +5,7 @@ pvc: debug: False coordinators: {% for node in pvc_nodes if node.is_coordinator %} - - {{ node.hostname }} + - {{ node.hostname.split('.')[0] }} {% endfor %} # api: Configuration of the API listener api: @@ -61,7 +61,7 @@ pvc: # uses the list of coordinators storage_hosts: {% for node in pvc_nodes if node.is_coordinator %} - - {{ node.hostname }} + - {{ node.hostname.split('.')[0] }} {% endfor %} # storage_domain: The storage domain name, concatenated with the coordinators list names # to form monitor access strings diff --git a/roles/pvc/templates/pvc/pvcnoded.yaml.j2 b/roles/pvc/templates/pvc/pvcnoded.yaml.j2 index 5f354ce..3c829a4 100644 --- a/roles/pvc/templates/pvc/pvcnoded.yaml.j2 +++ b/roles/pvc/templates/pvc/pvcnoded.yaml.j2 @@ -2,7 +2,7 @@ # pvcnoded configuration # {{ ansible_managed }} pvc: - node: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.hostname }}{% endfor %} + node: {% for node in pvc_nodes if node.hostname == inventory_hostname %}{{ node.hostname.split('.')[0] }}{% endfor %} debug: False functions: @@ -13,7 +13,7 @@ pvc: cluster: coordinators: {% for node in pvc_nodes if node.is_coordinator %} - - {{ node.hostname }} + - {{ node.hostname.split('.')[0] }} {% endfor %} networks: upstream: