From e793816ac71e8a7ce163878dd8a84cb442811cdd Mon Sep 17 00:00:00 2001 From: Filip Pytloun Date: Wed, 3 May 2017 15:21:03 +0200 Subject: [PATCH] Manage minion.d using support metadata Change-Id: Iea239435bde1572e072c97d1376eae31a8e3a010 --- elasticsearch/client/service.sls | 7 ------- elasticsearch/files/_elasticsearch.conf | 4 ---- elasticsearch/meta/salt.yml | 7 +++++++ 3 files changed, 7 insertions(+), 11 deletions(-) delete mode 100644 elasticsearch/files/_elasticsearch.conf create mode 100644 elasticsearch/meta/salt.yml diff --git a/elasticsearch/client/service.sls b/elasticsearch/client/service.sls index 66a33f8..6fe0e9e 100644 --- a/elasticsearch/client/service.sls +++ b/elasticsearch/client/service.sls @@ -1,13 +1,6 @@ {%- 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 }} diff --git a/elasticsearch/files/_elasticsearch.conf b/elasticsearch/files/_elasticsearch.conf deleted file mode 100644 index 0a555bc..0000000 --- a/elasticsearch/files/_elasticsearch.conf +++ /dev/null @@ -1,4 +0,0 @@ -{%- from "elasticsearch/map.jinja" import client with context %} - -elasticsearch: - host: {{client.server.host}}:{{client.server.port}} diff --git a/elasticsearch/meta/salt.yml b/elasticsearch/meta/salt.yml new file mode 100644 index 0000000..bfd5e0f --- /dev/null +++ b/elasticsearch/meta/salt.yml @@ -0,0 +1,7 @@ +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 %} -- 2.32.7