summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/ntp.conf.archlinux.erb8
-rw-r--r--templates/ntp.conf.debian.erb4
-rw-r--r--templates/ntp.conf.el.erb4
-rw-r--r--templates/ntp.conf.freebsd.erb7
-rw-r--r--templates/ntp.conf.gentoo.erb59
-rw-r--r--templates/ntp.conf.suse.erb8
6 files changed, 77 insertions, 13 deletions
diff --git a/templates/ntp.conf.archlinux.erb b/templates/ntp.conf.archlinux.erb
index 5e27334..ef3b725 100644
--- a/templates/ntp.conf.archlinux.erb
+++ b/templates/ntp.conf.archlinux.erb
@@ -4,9 +4,15 @@
# - the ntp.conf man page
# - http://support.ntp.org/bin/view/Support/GettingStarted
# - https://wiki.archlinux.org/index.php/Network_Time_Protocol_daemon
+#
+<% if @panic == false -%>
+# Keep ntpd from panicking in the event of a large clock skew
+# # when a VM guest is suspended and resumed.
+tinker panic 0
+<% end -%>
# Associate to public NTP pool servers; see http://www.pool.ntp.org/
-<% [@servers_real].flatten.each do |server| -%>
+<% [@servers].flatten.each do |server| -%>
server <%= server %>
<% end -%>
diff --git a/templates/ntp.conf.debian.erb b/templates/ntp.conf.debian.erb
index 15451cd..324b91c 100644
--- a/templates/ntp.conf.debian.erb
+++ b/templates/ntp.conf.debian.erb
@@ -1,6 +1,6 @@
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
-<% if @is_virtual == "true" -%>
+<% if @panic == false -%>
# Keep ntpd from panicking in the event of a large clock skew
# when a VM guest is suspended and resumed.
tinker panic 0
@@ -26,7 +26,7 @@ filegen clockstats file clockstats type day enable
# pool: <http://www.pool.ntp.org/join.html>
# Managed by puppet class { "ntp": servers => [ ... ] }
-<% [@servers_real].flatten.each do |server| -%>
+<% [@servers].flatten.each do |server| -%>
server <%= server %>
<% end -%>
diff --git a/templates/ntp.conf.el.erb b/templates/ntp.conf.el.erb
index 77c731a..157b28d 100644
--- a/templates/ntp.conf.el.erb
+++ b/templates/ntp.conf.el.erb
@@ -1,4 +1,4 @@
-<% if @is_virtual == "true" -%>
+<% if @panic == false -%>
# Keep ntpd from panicking in the event of a large clock skew
# when a VM guest is suspended and resumed.
tinker panic 0
@@ -24,7 +24,7 @@ restrict -6 ::1
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
# Managed by puppet class { "ntp": servers => [ ... ] }
-<% [@servers_real].flatten.each do |server| -%>
+<% [@servers].flatten.each do |server| -%>
server <%= server %>
<% end -%>
diff --git a/templates/ntp.conf.freebsd.erb b/templates/ntp.conf.freebsd.erb
index 1cf00cc..7fcffb8 100644
--- a/templates/ntp.conf.freebsd.erb
+++ b/templates/ntp.conf.freebsd.erb
@@ -18,13 +18,12 @@
# The option `maxpoll 9' is used to prevent PLL/FLL flipping on FreeBSD.
#
# Managed by puppet class { "ntp": servers => [ ... ] }
-<% if @is_virtual == "true" -%>
-
+<% if @panic == false -%>
# Keep ntpd from panicking in the event of a large clock skew
# when a VM guest is suspended and resumed.
tinker panic 0
-
<% end -%>
-<% [@servers_real].flatten.each do |server| -%>
+
+<% [@servers].flatten.each do |server| -%>
server <%= server %>
<% end -%>
diff --git a/templates/ntp.conf.gentoo.erb b/templates/ntp.conf.gentoo.erb
new file mode 100644
index 0000000..c22026a
--- /dev/null
+++ b/templates/ntp.conf.gentoo.erb
@@ -0,0 +1,59 @@
+# NOTES:
+# DHCP clients can append or replace NTP configuration files.
+# You should consult your DHCP client documentation about its
+# default behaviour and how to change it.
+
+# Name of the servers ntpd should sync with
+# Please respect the access policy as stated by the responsible person.
+#server ntp.example.tld iburst
+<% if @panic == false -%>
+# Keep ntpd from panicking in the event of a large clock skew
+# # when a VM guest is suspended and resumed.
+tinker panic 0
+<% end -%>
+
+# Managed by puppet class { "ntp": servers => [ ... ] }
+<% [@servers].flatten.each do |server| -%>
+server <%= server %>
+<% end -%>
+
+# Common pool for random people
+#server pool.ntp.org
+
+##
+# A list of available servers can be found here:
+# http://www.pool.ntp.org/
+# http://www.pool.ntp.org/#use
+# A good way to get servers for your machine is:
+# netselect -s 3 pool.ntp.org
+##
+
+# you should not need to modify the following paths
+driftfile /var/lib/ntp/ntp.drift
+
+#server ntplocal.example.com prefer
+#server timeserver.example.org
+
+# Warning: Using default NTP settings will leave your NTP
+# server accessible to all hosts on the Internet.
+
+# If you want to deny all machines (including your own)
+# from accessing the NTP server, uncomment:
+#restrict default ignore
+
+
+<% if @restrict -%>
+# To deny other machines from changing the
+# configuration but allow localhost:
+restrict default nomodify nopeer
+restrict 127.0.0.1
+restrict ::1
+<% end -%>
+
+
+# To allow machines within your network to synchronize
+# their clocks with your server, but ensure they are
+# not allowed to configure the server or used as peers
+# to synchronize against, uncomment this line.
+#
+#restrict 192.168.0.0 mask 255.255.255.0 nomodify nopeer notrap
diff --git a/templates/ntp.conf.suse.erb b/templates/ntp.conf.suse.erb
index 4ce6205..1cbe6a2 100644
--- a/templates/ntp.conf.suse.erb
+++ b/templates/ntp.conf.suse.erb
@@ -29,21 +29,21 @@
##
# server 127.127.8.0 mode 5 prefer
-<% if @is_virtual == "false" -%>
+<% if @panic == true -%>
##
## Undisciplined Local Clock. This is a fake driver intended for backup
## and when no outside source of synchronized time is available.
##
server 127.127.1.0 # local clock (LCL)
fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
-
<% end -%>
+
# Managed by puppet class { "ntp": servers => [ ... ] }
-<% [@servers_real].flatten.each do |server| -%>
+<% [@servers].flatten.each do |server| -%>
server <%= server %>
<% end -%>
-<% if @is_virtual == "true" -%>
+<% if @panic == false -%>
# Keep ntpd from panicking in the event of a large clock skew
# when a VM guest is suspended and resumed.
tinker panic 0