]> git.donarmstrong.com Git - dsa-puppet.git/commitdiff
Move to our standard idiom of per-host files. You wouldn't think ntp
authorStephen Gran <steve@lobefin.net>
Wed, 21 Oct 2009 07:47:25 +0000 (08:47 +0100)
committerStephen Gran <steve@lobefin.net>
Wed, 21 Oct 2009 07:47:25 +0000 (08:47 +0100)
would be difficult ....
Signed-off-by: Stephen Gran <steve@lobefin.net>
modules/ntp/files/client.conf [deleted file]
modules/ntp/files/common/client.conf [new file with mode: 0644]
modules/ntp/files/common/server.conf [new file with mode: 0644]
modules/ntp/files/per-host/ancina.debian.org/client.conf [new file with mode: 0644]
modules/ntp/files/server.conf [deleted file]
modules/ntp/manifests/client.pp
modules/ntp/manifests/server.pp

diff --git a/modules/ntp/files/client.conf b/modules/ntp/files/client.conf
deleted file mode 100644 (file)
index 729f2c8..0000000
+++ /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 (file)
index 0000000..729f2c8
--- /dev/null
@@ -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 (file)
index 0000000..6511b02
--- /dev/null
@@ -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 (file)
index 0000000..486e087
--- /dev/null
@@ -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 (file)
index 6511b02..0000000
+++ /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
index c30316c75b1f91d69e64caeca9c3e86382562858..0882e49d6e512c5e31b8ee0043f8e4e0fef7df57 100644 (file)
@@ -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"]
                ;
index ded54e7291a78d30606604b9873b901c5288aa32..ab250f6d1b0e1c9481c0002386c9ca48aaf9d688 100644 (file)
@@ -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"]
                ;