Merge pull request #14 from simonpasquier/fix-include-python

Fix include statements in the Python template
diff --git a/collectd/map.jinja b/collectd/map.jinja
index c25b5cb..66c6974 100644
--- a/collectd/map.jinja
+++ b/collectd/map.jinja
@@ -7,17 +7,17 @@
         'config_dir': '/etc/collectd.d',
         'read_interval': 60,
         'file_logging': True,
-        'remote_collector': False
+        'remote_collector': False,
         'use_fqdn': True,
     },
     'Debian': {
-        'pkgs': ['collectd-core', 'snmp', 'python-yaml', 'python-simplejson'],
+        'pkgs': ['collectd-core', 'snmp', 'python-yaml', 'libpython2.7', 'python-simplejson'],
         'service': 'collectd',
         'config_file': '/etc/collectd/collectd.conf',
         'config_dir': '/etc/collectd/conf.d',
         'read_interval': 60,
         'file_logging': True,
-        'remote_collector': False
+        'remote_collector': False,
         'use_fqdn': True,
     },
     'RedHat': {
@@ -27,7 +27,7 @@
         'config_dir': '/etc/collectd.d',
         'read_interval': 60,
         'file_logging': True,
-        'remote_collector': False
+        'remote_collector': False,
         'use_fqdn': True,
     },
 }, merge=salt['pillar.get']('collectd:client')) %}
diff --git a/collectd/meta/sphinx.yml b/collectd/meta/sphinx.yml
index 4959fff..e7fa0cb 100644
--- a/collectd/meta/sphinx.yml
+++ b/collectd/meta/sphinx.yml
@@ -1,11 +1,11 @@
 {%- from "collectd/map.jinja" import client with context %}
-{%- set service_grains = {'collectd': {'plugin': {}}} %}
+{%- set service_grains = {'collectd': {'local_plugin': {}}} %}
 {%- for service_name, service in pillar.items() %}
 {%- if service.get('_support', {}).get('collectd', {}).get('enabled', False) %}
 {%- set grains_fragment_file = service_name+'/meta/collectd.yml' %}
 {%- macro load_grains_file() %}{% include grains_fragment_file %}{% endmacro %}
 {%- set grains_yaml = load_grains_file()|load_yaml %}
-{%- set _dummy = service_grains.collectd.plugin.update(grains_yaml.plugin) %}
+{%- do service_grains.collectd.local_plugin.update(grains_yaml.get('local_plugin', {})) %}
 {%- endif %}
 {%- endfor %}
 doc:
@@ -21,4 +21,4 @@
           value: {{ backend.host }}:{{ backend.port }}
 {%- endfor %}
         plugins:
-          value: {% for plugin_name, plugin in service_grains.collectd.plugin.iteritems() %} {{ plugin.plugin }}{% endfor %}
+          value: {% for plugin_name, plugin in service_grains.collectd.local_plugin.iteritems() %} {{ plugin_name }}{% endfor %}