File tree 3 files changed +11
-0
lines changed
3 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 18
18
# '2.debian.pool.ntp.org iburst',
19
19
# '3.debian.pool.ntp.org iburst', ]
20
20
#
21
+ # $restrict = true
22
+ # Whether to restrict ntp daemons from allowing others to use as a server.
23
+ #
24
+ # $autoupdate = false
25
+ # Whether to update the ntp package automatically or not.
26
+ #
21
27
# Actions:
22
28
#
23
29
# Installs, configures, and manages the ntp service.
34
40
# [Remember: No empty lines between comments and class definition]
35
41
class ntp ($servers=' UNSET' ,
36
42
$ensure=' running' ,
43
+ $restrict=true ,
37
44
$autoupdate=false
38
45
) {
39
46
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ filegen clockstats file clockstats type day enable
30
30
server <%= server %>
31
31
<% end -%>
32
32
33
+ <% if @restrict -%>
33
34
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
34
35
# details. The web page < http: //support.ntp.org/bin/view/Support/AccessRestrictions>
35
36
# might also be helpful.
@@ -50,6 +51,7 @@ restrict ::1
50
51
# cryptographically authenticated.
51
52
#restrict 192.168.123.0 mask 255.255.255.0 notrust
52
53
54
+ <% end -%>
53
55
54
56
# If you want to provide time to your local subnet, change the next line.
55
57
# (Again, the address is an example only.)
Original file line number Diff line number Diff line change 4
4
tinker panic 0
5
5
6
6
<% end -%>
7
+ <% if @restrict -%>
7
8
# Permit time synchronization with our time source, but do not
8
9
# permit the source to query or modify the service on this system.
9
10
restrict default kod nomodify notrap nopeer noquery
@@ -18,6 +19,7 @@ restrict -6 ::1
18
19
# Hosts on local network are less restricted.
19
20
#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap
20
21
22
+ <% end -%>
21
23
# Use public servers from the pool.ntp.org project.
22
24
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
23
25
You can’t perform that action at this time.
0 commit comments