Merge pull request #3 from tcpcloud/kitchen-ci
add CI/reharsial tests
diff --git a/ntp/files/collectd.conf b/ntp/files/collectd_ntpd.conf
similarity index 76%
rename from ntp/files/collectd.conf
rename to ntp/files/collectd_ntpd.conf
index 43325b1..d1dc854 100644
--- a/ntp/files/collectd.conf
+++ b/ntp/files/collectd_ntpd.conf
@@ -1,6 +1,9 @@
{%- from "ntp/map.jinja" import server with context %}
-LoadPlugin ntpd
-<Plugin "ntpd">
+<LoadPlugin ntpd>
+ Globals false
+</LoadPlugin>
+
+<Plugin ntpd>
Host "{% if server.bind.address == '0.0.0.0' %}127.0.0.1{% else %}{{ server.bind.address }}{% endif %}"
Port "123"
ReverseLookups false
diff --git a/ntp/files/sensu.conf b/ntp/files/sensu.conf
deleted file mode 100644
index eb84752..0000000
--- a/ntp/files/sensu.conf
+++ /dev/null
@@ -1,16 +0,0 @@
-{%- from "ntp/map.jinja" import client with context -%}
-local_ntp_service_proc:
- command: "PATH=$PATH:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_procs -a '/usr/sbin/ntpd' -u ntp -c 1:1"
- interval: 300
- occurrences: 1
- subscribers:
- - local-ntp-client
- - local-ntp-server
-{%- for stratum in client.get('strata', []) %}
-local_ntp_client_time_{{ stratum }}:
- command: "PATH=:/usr/lib64/nagios/plugins:/usr/lib/nagios/plugins check_ntp_time -q -H {{ stratum }} -w 0.2 -c 2"
- interval: 3600
- occurrences: 10
- subscribers:
- - local-ntp-client
-{%- endfor %}
\ No newline at end of file
diff --git a/ntp/map.jinja b/ntp/map.jinja
index 249eb2f..f136b18 100644
--- a/ntp/map.jinja
+++ b/ntp/map.jinja
@@ -14,11 +14,20 @@
{% set server = salt['grains.filter_by']({
'Arch': {
'service': 'ntpd',
+ 'bind': {
+ 'address': '0.0.0.0',
+ }
},
'Debian': {
'service': 'ntp',
+ 'bind': {
+ 'address': '0.0.0.0',
+ }
},
'RedHat': {
'service': 'ntpd',
+ 'bind': {
+ 'address': '0.0.0.0',
+ }
},
}, merge=salt['pillar.get']('ntp:server')) %}
diff --git a/ntp/meta/collectd.yml b/ntp/meta/collectd.yml
index 8d049fe..5e34280 100644
--- a/ntp/meta/collectd.yml
+++ b/ntp/meta/collectd.yml
@@ -1,4 +1,5 @@
plugin:
- ntp_client_ntpd:
+ ntp_server_status:
plugin: ntpd
- interval: 60
+ execution: local
+ template: ntp/files/collectd_ntpd.conf