X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fntp%2Fmanifests%2Finit.pp;h=018e5fcbc72b4188cb8bcc9bbe50e930d2e921a2;hb=3e5945324a388a3b0b4ac6bff81a88c30bba0fcf;hp=4f6ff6832cc8f0d1403fb89c2eeae99b15a41e89;hpb=47d3982f22efc2ecabeba76c6bf6cf6b3911cca3;p=mirror%2Fdsa-puppet.git diff --git a/modules/ntp/manifests/init.pp b/modules/ntp/manifests/init.pp index 4f6ff6832..018e5fcbc 100644 --- a/modules/ntp/manifests/init.pp +++ b/modules/ntp/manifests/init.pp @@ -1,20 +1,24 @@ class ntp { - package { 'ntp': ensure => installed } service { 'ntp': - ensure => stopped, + ensure => running, require => Package['ntp'] } - @ferm::rule { 'dsa-ntp': + ferm::rule { 'dsa-ntp': domain => '(ip ip6)', description => 'Allow ntp access', rule => '&SERVICE(udp, 123)' } + file { '/etc/init.d/ntp': + source => 'puppet:///modules/ntp/ntp.init', + mode => '0555', + notify => Exec['systemctl daemon-reload'], + } file { '/var/lib/ntp': ensure => directory, owner => ntp, @@ -35,7 +39,13 @@ class ntp { require => Package['ntp'], } - if getfromhash($site::nodeinfo, 'timeserver') { + munin::check { [ + 'ntp_offset', + 'ntp_states', + ]: + } + + if getfromhash($deprecated::nodeinfo, 'timeserver') { include ntp::timeserver } else { include ntp::client