From: Stephen Gran Date: Wed, 21 Oct 2009 07:47:25 +0000 (+0100) Subject: Move to our standard idiom of per-host files. You wouldn't think ntp X-Git-Url: https://git.adam-barratt.org.uk/?a=commitdiff_plain;h=b7c8611cf8ea27fea00d2678b65c42401782cafd;hp=798b2d47e3a2e35962e581d81d3072ee5020ff74;p=mirror%2Fdsa-puppet.git Move to our standard idiom of per-host files. You wouldn't think ntp would be difficult .... Signed-off-by: Stephen Gran --- diff --git a/modules/ntp/files/client.conf b/modules/ntp/files/client.conf deleted file mode 100644 index 729f2c896..000000000 --- a/modules/ntp/files/client.conf +++ /dev/null @@ -1,21 +0,0 @@ -## -## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. -## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git -## - -driftfile /var/lib/ntp/ntp.drift -statsdir /var/log/ntpstats/ - -statistics loopstats peerstats clockstats -filegen loopstats file loopstats type day enable -filegen peerstats file peerstats type day enable -filegen clockstats file clockstats type day enable -server geo1.debian.org iburst dynamic -server geo2.debian.org iburst dynamic -server geo3.debian.org iburst dynamic - -restrict -4 default kod notrap nomodify nopeer noquery -restrict -6 default kod notrap nomodify nopeer noquery - -restrict 127.0.0.1 -restrict ::1 diff --git a/modules/ntp/files/common/client.conf b/modules/ntp/files/common/client.conf new file mode 100644 index 000000000..729f2c896 --- /dev/null +++ b/modules/ntp/files/common/client.conf @@ -0,0 +1,21 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +driftfile /var/lib/ntp/ntp.drift +statsdir /var/log/ntpstats/ + +statistics loopstats peerstats clockstats +filegen loopstats file loopstats type day enable +filegen peerstats file peerstats type day enable +filegen clockstats file clockstats type day enable +server geo1.debian.org iburst dynamic +server geo2.debian.org iburst dynamic +server geo3.debian.org iburst dynamic + +restrict -4 default kod notrap nomodify nopeer noquery +restrict -6 default kod notrap nomodify nopeer noquery + +restrict 127.0.0.1 +restrict ::1 diff --git a/modules/ntp/files/common/server.conf b/modules/ntp/files/common/server.conf new file mode 100644 index 000000000..6511b02f3 --- /dev/null +++ b/modules/ntp/files/common/server.conf @@ -0,0 +1,22 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +driftfile /var/lib/ntp/ntp.drift +statsdir /var/log/ntpstats/ + +statistics loopstats peerstats clockstats +filegen loopstats file loopstats type day enable +filegen peerstats file peerstats type day enable +filegen clockstats file clockstats type day enable +server 0.debian.pool.ntp.org iburst dynamic +server 1.debian.pool.ntp.org iburst dynamic +server 2.debian.pool.ntp.org iburst dynamic +server 3.debian.pool.ntp.org iburst dynamic + +restrict -4 default kod notrap nomodify nopeer noquery +restrict -6 default kod notrap nomodify nopeer noquery + +restrict 127.0.0.1 +restrict ::1 diff --git a/modules/ntp/files/per-host/ancina.debian.org/client.conf b/modules/ntp/files/per-host/ancina.debian.org/client.conf new file mode 100644 index 000000000..486e08727 --- /dev/null +++ b/modules/ntp/files/per-host/ancina.debian.org/client.conf @@ -0,0 +1,19 @@ +## +## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. +## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git +## + +driftfile /var/lib/ntp/ntp.drift +statsdir /var/log/ntpstats/ + +statistics loopstats peerstats clockstats +filegen loopstats file loopstats type day enable +filegen peerstats file peerstats type day enable +filegen clockstats file clockstats type day enable +server ntp.ugent.be iburst dynamic + +restrict -4 default kod notrap nomodify nopeer noquery +restrict -6 default kod notrap nomodify nopeer noquery + +restrict 127.0.0.1 +restrict ::1 diff --git a/modules/ntp/files/server.conf b/modules/ntp/files/server.conf deleted file mode 100644 index 6511b02f3..000000000 --- a/modules/ntp/files/server.conf +++ /dev/null @@ -1,22 +0,0 @@ -## -## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE. -## USE: git clone git+ssh://$USER@puppet.debian.org/srv/puppet.debian.org/git/dsa-puppet.git -## - -driftfile /var/lib/ntp/ntp.drift -statsdir /var/log/ntpstats/ - -statistics loopstats peerstats clockstats -filegen loopstats file loopstats type day enable -filegen peerstats file peerstats type day enable -filegen clockstats file clockstats type day enable -server 0.debian.pool.ntp.org iburst dynamic -server 1.debian.pool.ntp.org iburst dynamic -server 2.debian.pool.ntp.org iburst dynamic -server 3.debian.pool.ntp.org iburst dynamic - -restrict -4 default kod notrap nomodify nopeer noquery -restrict -6 default kod notrap nomodify nopeer noquery - -restrict 127.0.0.1 -restrict ::1 diff --git a/modules/ntp/manifests/client.pp b/modules/ntp/manifests/client.pp index c30316c75..0882e49d6 100644 --- a/modules/ntp/manifests/client.pp +++ b/modules/ntp/manifests/client.pp @@ -3,7 +3,8 @@ class ntp::client inherits ntp { owner => root, group => root, mode => 444, - source => [ "puppet:///ntp/client.conf" ], + source => [ "puppet:///ntp/per-host/$fqdn/client.conf", + "puppet:///ntp/common/client.conf" ], notify => Exec["ntp restart"], require => Package["ntp"] ; diff --git a/modules/ntp/manifests/server.pp b/modules/ntp/manifests/server.pp index ded54e729..ab250f6d1 100644 --- a/modules/ntp/manifests/server.pp +++ b/modules/ntp/manifests/server.pp @@ -3,7 +3,8 @@ class ntp::server inherits ntp { owner => root, group => root, mode => 444, - source => [ "puppet:///ntp/server.conf" ], + source => [ "puppet:///ntp/per-host/$fqdn/server.conf", + "puppet:///ntp/common/server.conf" ], notify => Exec["ntp restart"], require => Package["ntp"] ;