Manage minion.d using support metadata

Change-Id: Iea239435bde1572e072c97d1376eae31a8e3a010
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 %}