Change-Id: Iea239435bde1572e072c97d1376eae31a8e3a010
{%- from "elasticsearch/map.jinja" import client with context %}
{%- if client.get('enabled', False) %}
{%- from "elasticsearch/map.jinja" import client with context %}
{%- if client.get('enabled', False) %}
-/etc/salt/minion.d/_elasticsearch.conf:
- file.managed:
- - source: salt://elasticsearch/files/_elasticsearch.conf
- - template: jinja
- - user: root
- - group: root
-
elasticsearch_client_packages:
pkg.installed:
- names: {{ client.pkgs }}
elasticsearch_client_packages:
pkg.installed:
- names: {{ client.pkgs }}
+++ /dev/null
-{%- from "elasticsearch/map.jinja" import client with context %}
-
-elasticsearch:
- host: {{client.server.host}}:{{client.server.port}}
--- /dev/null
+minion:
+ {%- if pillar.elasticsearch.client is defined %}
+ elasticsearch:
+ {%- from "elasticsearch/map.jinja" import client with context %}
+ elasticsearch:
+ host: {{client.server.host}}:{{client.server.port}}
+ {%- endif %}