summaryrefslogtreecommitdiffstats
path: root/templates/ntp.conf.j2
diff options
context:
space:
mode:
authorkadecole <kcole@yahoo.com>2015-06-18 00:23:06 -0500
committerJeff Geerling <geerlingguy@mac.com>2016-03-03 22:35:50 -0600
commit567078d7c3ac7190d6748f0cfcd535e82912a12b (patch)
treeec062a64a2a5b2fa7cc1112d86281e24add57816 /templates/ntp.conf.j2
parent2bfe67855da09a0b3b1cdb0d751b115fa42f1c36 (diff)
downloadntp-567078d7c3ac7190d6748f0cfcd535e82912a12b.tar.gz
ntp-567078d7c3ac7190d6748f0cfcd535e82912a12b.tar.bz2
ntp-567078d7c3ac7190d6748f0cfcd535e82912a12b.tar.xz
ntp-567078d7c3ac7190d6748f0cfcd535e82912a12b.zip
Add a managed ntp.conf template.
Diffstat (limited to 'templates/ntp.conf.j2')
-rw-r--r--templates/ntp.conf.j222
1 files changed, 22 insertions, 0 deletions
diff --git a/templates/ntp.conf.j2 b/templates/ntp.conf.j2
new file mode 100644
index 0000000..b0ddb0c
--- /dev/null
+++ b/templates/ntp.conf.j2
@@ -0,0 +1,22 @@
+# {{ ansible_managed }}
+
+# Default NTP servers for the operating system.
+{% for item in ntp_servers %}
+server {{ item }}
+{% endfor %}
+
+# Security:
+#
+# By default, only allow time queries and block all other requests
+# from unauthenticated clients.
+#
+# See http://support.ntp.org/bin/view/Support/AccessRestrictions
+# for more information.
+#
+restrict default kod limited nomodify notrap nopeer noquery
+restrict -6 default kod limited nomodify notrap nopeer noquery
+
+# The following settings allow unrestricted access from the localhost
+restrict 127.0.0.1
+restrict -6 ::1
+restrict 127.127.1.0