From 6820f325705b9b280494a30c684e3f2ab8cef31d Mon Sep 17 00:00:00 2001 From: Astro Date: Fri, 15 May 2020 18:02:54 +0200 Subject: [PATCH] collectd: fix dhcpcount --- salt/collectd/collectd.conf | 2 +- salt/collectd/init.sls | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) 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