Merge pull request #6 from simonpasquier/stacklight

Add collectd support only when the server is enabled
diff --git a/elasticsearch/meta/collectd.yml b/elasticsearch/meta/collectd.yml
index 20952d4..9da665f 100644
--- a/elasticsearch/meta/collectd.yml
+++ b/elasticsearch/meta/collectd.yml
@@ -1,6 +1,7 @@
 {%- if pillar.elasticsearch.server is defined %}
 {%- from "elasticsearch/map.jinja" import server with context %}
 
+{%- if server.get('enabled', False) %}
 local_plugin:
   elasticsearch_cluster:
     plugin: python
@@ -12,3 +13,4 @@
       elasticsearch:
         match: 'java.*elasticsearch'
 {%- endif %}
+{%- endif %}