diff --git a/salt/collectd/collectd.conf b/salt/collectd/collectd.conf index 4dc9c99..f52eee5 100644 --- a/salt/collectd/collectd.conf +++ b/salt/collectd/collectd.conf @@ -38,7 +38,7 @@ LoadPlugin ping Interval 10 -{%- elif plugin == 'dhcpcount' and conf is True %} +{%- elif plugin == 'dhcpcount' and conf %} LoadPlugin exec Exec "collectd" "/usr/bin/dhcpcount.rb" diff --git a/salt/collectd/init.sls b/salt/collectd/init.sls index 6bc0073..c65842d 100644 --- a/salt/collectd/init.sls +++ b/salt/collectd/init.sls @@ -17,6 +17,9 @@ collectd: - template: 'jinja' {%- if pillar['collectd'].get('dhcpcount') %} +ruby: + pkg.installed: [] + /usr/bin/dhcpcount.rb: file.managed: - source: salt://collectd/dhcpcount.rb