From 348f7f39cc4ea84cec77ba4f925bef774d59f910 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Tue, 11 Aug 2020 11:37:53 -0400 Subject: [PATCH] strip node suffix --- salt/elasticsearch/init.sls | 2 +- salt/utility/bin/crossthestreams | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/salt/elasticsearch/init.sls b/salt/elasticsearch/init.sls index c93b6a900..28db606f1 100644 --- a/salt/elasticsearch/init.sls +++ b/salt/elasticsearch/init.sls @@ -179,7 +179,7 @@ so-elasticsearch: {%- if ismanager %} {%- if salt['pillar.get']('nodestab', {}) %} {%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %} - - {{ SN }}:{{ SNDATA.ip }} + - {{ SN.split('_')|first }}:{{ SNDATA.ip }} {%- endfor %} {%- endif %} {%- endif %} diff --git a/salt/utility/bin/crossthestreams b/salt/utility/bin/crossthestreams index 6301a4f71..9c398ae6d 100644 --- a/salt/utility/bin/crossthestreams +++ b/salt/utility/bin/crossthestreams @@ -38,7 +38,7 @@ echo "Applying cross cluster search config..." {%- if salt['pillar.get']('nodestab', {}) %} {%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %} {%- if FEATURES is sameas true %} -curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SN }}:9300"]}}}}}' +curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN.split('_')|first }}": {"skip_unavailable": "true", "seeds": ["{{ SN }}:9300"]}}}}}' {%- else %} curl -XPUT http://{{ ES }}:9200/_cluster/settings -H'Content-Type: application/json' -d '{"persistent": {"search": {"remote": {"{{ SN }}": {"skip_unavailable": "true", "seeds": ["{{ SNDATA.ip }}:9300"]}}}}}' {%- endif %}