Restart Elastic on addition of node.

This commit is contained in:
Mike Reeves
2020-12-07 14:09:41 -05:00
parent 94253e92a6
commit 8ea088c3fc
2 changed files with 5 additions and 6 deletions

View File

@@ -189,12 +189,10 @@ so-elasticsearch:
- user: elasticsearch
- extra_hosts:
- {{ grains.host }}:{{ NODEIP }}
{%- if ismanager %}
{%- if salt['pillar.get']('nodestab', {}) %}
{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
{%- for SN, SNDATA in salt['pillar.get']('nodestab', {}).items() %}
- {{ SN.split('_')|first }}:{{ SNDATA.ip }}
{%- endfor %}
{%- endif %}
{%- endfor %}
{%- endif %}
- environment:
- discovery.type=single-node