allow for pillar override of defaults

This commit is contained in:
m0duspwnens
2021-09-17 12:11:12 -04:00
parent 0d074dafd4
commit d0c87cd317
2 changed files with 3 additions and 9 deletions

View File

@@ -28,3 +28,5 @@
{% do ESCONFIG.elasticsearch.config.discovery.update({'seed_hosts': [grains.master]}) %} {% do ESCONFIG.elasticsearch.config.discovery.update({'seed_hosts': [grains.master]}) %}
{% endif %} {% endif %}
{% endif %} {% endif %}
{% set ESCONFIG = salt['pillar.get']('elasticsearch:config', default=ESCONFIG.elasticsearch.config, merge=True) %}

View File

@@ -152,17 +152,9 @@ esyml:
- user: 930 - user: 930
- group: 939 - group: 939
- defaults: - defaults:
ESCONFIG: {{ ESCONFIG.elasticsearch.config }} ESCONFIG: {{ ESCONFIG }}
- template: jinja - template: jinja
esyml_test:
file.managed:
- name: /tmp/elasticsearch.yml
- user: 930
- group: 939
- contents: {{ ESCONFIG | yaml }}
#sync templates to /opt/so/conf/elasticsearch/templates #sync templates to /opt/so/conf/elasticsearch/templates
{% for TEMPLATE in TEMPLATES %} {% for TEMPLATE in TEMPLATES %}
es_template_{{TEMPLATE.split('.')[0] | replace("/","_") }}: es_template_{{TEMPLATE.split('.')[0] | replace("/","_") }}: