strip node suffix

This commit is contained in:
Mike Reeves
2020-08-11 11:37:53 -04:00
parent 05a05b5e9b
commit 348f7f39cc
2 changed files with 2 additions and 2 deletions

View File

@@ -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 %}

View File

@@ -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 %}