include debian-org
include monit
include apt-keys
+ include ntp
include motd
include samhain
geo1,geo2,geo3:
{
include named::geodns
- include ntp::server
}
default: {
- include ntp::client
}
}
case $brokenhosts {
+++ /dev/null
-##
-## 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
+++ /dev/null
-##
-## 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
+++ /dev/null
-##
-## 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
+++ /dev/null
-class ntp::client inherits ntp {
- file { "/etc/ntp.conf":
- owner => root,
- group => root,
- mode => 444,
- source => [ "puppet:///ntp/per-host/$fqdn/client.conf",
- "puppet:///ntp/common/client.conf" ],
- notify => Exec["ntp restart"],
- require => Package["ntp"]
- ;
- }
-}
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,
}
}
+++ /dev/null
-class ntp::server inherits ntp {
- file { "/etc/ntp.conf":
- owner => root,
- group => root,
- mode => 444,
- source => [ "puppet:///ntp/per-host/$fqdn/server.conf",
- "puppet:///ntp/common/server.conf" ],
- notify => Exec["ntp restart"],
- require => Package["ntp"]
- ;
- "/var/lib/ntpstats":
- ensure => directory,
- owner => ntp,
- group => ntp,
- mode => 755
- ;
- }
-}
--- /dev/null
+##
+## 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
+
+<% case fqdn
+ when /geo[123].debian.org/:
+-%>
+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
+<% when "ancina.debian.org/": -%>
+server ntp.ugent.be iburst dynamic
+<% else -%>
+server geo1.debian.org iburst dynamic
+server geo2.debian.org iburst dynamic
+server geo3.debian.org iburst dynamic
+<% end -%>
+
+restrict -4 default kod notrap nomodify nopeer noquery
+restrict -6 default kod notrap nomodify nopeer noquery
+
+restrict 127.0.0.1
+restrict ::1