Fix collectd meta when the service is disabled
Change-Id: I4a012801198a1f6914040158835ea5694b804f47
diff --git a/glance/meta/collectd.yml b/glance/meta/collectd.yml
index ccc5e9d..edcd624 100644
--- a/glance/meta/collectd.yml
+++ b/glance/meta/collectd.yml
@@ -1,4 +1,5 @@
{%- from "glance/map.jinja" import server with context %}
+{%- if server.get('enabled', False) %}
local_plugin:
collectd_check_local_endpoint:
endpoint:
@@ -14,3 +15,4 @@
username: {{ server.identity.user }}
password: {{ server.identity.password }}
tenant: {{ server.identity.tenant }}
+{%- endif %}