Fix ES merge

This commit is contained in:
Mike Reeves
2022-09-10 19:25:01 -04:00
parent f2ff8ca4e2
commit 3de4e56db9
2 changed files with 6 additions and 3 deletions

View File

@@ -29,12 +29,13 @@
{% do ESCONFIG.elasticsearch.config.xpack.ml.update({'enabled': true}) %}
{% endif %}
{# merge with the elasticsearch pillar #}
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}
{% do ESCONFIG.elasticsearch.config.node.update({'name': grains.host}) %}
{% do ESCONFIG.elasticsearch.config.cluster.update({'name': grains.host}) %}
{% do ESCONFIG.elasticsearch.config.transport.update({'publish_host': grains.host}) %}
{# merge with the elasticsearch pillar #}
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}
{% if salt['pillar.get']('elasticsearch:config:path:repo', False) %}
{% for repo in pillar.elasticsearch.config.path.repo %}
{# remove elasticsearch.config.path.repo value if the directory doesn't exist on the node #}