X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Fntp%2Fmanifests%2Finit.pp;h=dfc1517906ef3a1b01877a89e95e868a02d5f5e7;hb=8dadeaed8aa9d6c79a7502badb684873b746428f;hp=1b02a836050c2e00d1abaf5a04b1eed70de32f2d;hpb=d656940e8a36439fa782a2f2966087d5cbebd66c;p=mirror%2Fdsa-puppet.git diff --git a/modules/ntp/manifests/init.pp b/modules/ntp/manifests/init.pp index 1b02a8360..dfc151790 100644 --- a/modules/ntp/manifests/init.pp +++ b/modules/ntp/manifests/init.pp @@ -1,14 +1,36 @@ class ntp { package { ntp: ensure => installed } - file { "/var/lib/ntp/": - ensure => directory, - owner => ntp, - group => ntp, - mode => 755 - ; + file { "/var/lib/ntp/": + ensure => directory, + owner => ntp, + group => ntp, + mode => 755 + ; + "/var/lib/ntpstats": + ensure => directory, + owner => ntp, + group => ntp, + mode => 755 + ; + "/etc/ntp.conf": + owner => root, + group => root, + mode => 444, + content => template("ntp/ntp.conf"), + notify => Exec["ntp restart"], + require => Package["ntp"] + ; } exec { "ntp restart": - path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", + path => "/etc/init.d:/usr/bin:/usr/sbin:/bin:/sbin", refreshonly => true, } + @ferm::rule { "dsa-ntp": + domain => "(ip ip6)", + description => "Allow ntp access", + rule => "&SERVICE(udp, 123)" + } } +# vim:set et: +# vim:set sts=4 ts=4: +# vim:set shiftwidth=4: