Merge pull request #24 from simonpasquier/fix-cluster-policy

Change policy for the elasticsearch_service cluster
diff --git a/elasticsearch/client.sls b/elasticsearch/client/init.sls
similarity index 70%
rename from elasticsearch/client.sls
rename to elasticsearch/client/init.sls
index 4c8246e..9621bbb 100644
--- a/elasticsearch/client.sls
+++ b/elasticsearch/client/init.sls
@@ -1,16 +1,8 @@
 {%- 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 }}
+include:
+  - elasticsearch.client.service
 
 {%- for index_name, index in client.get('index', {}).iteritems() %}
 elasticsearch_index_{{ index_name }}:
diff --git a/elasticsearch/client/service.sls b/elasticsearch/client/service.sls
new file mode 100644
index 0000000..66a33f8
--- /dev/null
+++ b/elasticsearch/client/service.sls
@@ -0,0 +1,15 @@
+{%- 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 }}
+
+{%- endif %}