4 # Fichier genere par puppet
5 # Environnement: development
7 server dns01.echo-net.net version 3
8 server dns02.echo-net.net version 4
10 driftfile /var/lib/ntp/ntp.drift
12 restrict default ignore
14 #server dns01.echo-net.net
15 restrict 192.168.0.150 nomodify
17 # allow everything from localhost
21 statsdir /var/log/ntpstats/
22 ntpsigndsocket /var/lib/samba/ntp_signd
24 statistics loopstats peerstats clockstats
25 filegen loopstats file loopstats type day enable link
26 filegen peerstats file peerstats type day disable
27 filegen clockstats file clockstats type day enable nolink
29 interface ignore wildcard
30 interface listen 127.0.0.1
33 test Ntp.lns get conf =
35 { "#comment" = "Fichier genere par puppet" }
36 { "#comment" = "Environnement: development" }
38 { "server" = "dns01.echo-net.net"
40 { "server" = "dns02.echo-net.net"
43 { "driftfile" = "/var/lib/ntp/ntp.drift" }
45 { "restrict" = "default"
46 { "action" = "ignore" } }
48 { "#comment" = "server dns01.echo-net.net" }
49 { "restrict" = "192.168.0.150"
50 { "action" = "nomodify" } }
52 { "#comment" = "allow everything from localhost" }
53 { "restrict" = "127.0.0.1" }
55 { "logfile" = "/var/log/ntpd" }
56 { "statsdir" = "/var/log/ntpstats/" }
57 { "ntpsigndsocket" = "/var/lib/samba/ntp_signd" }
63 { "filegen" = "loopstats"
64 { "file" = "loopstats" }
66 { "enable" = "enable" }
68 { "filegen" = "peerstats"
69 { "file" = "peerstats" }
71 { "enable" = "disable" } }
72 { "filegen" = "clockstats"
73 { "file" = "clockstats" }
75 { "enable" = "enable" }
76 { "link" = "nolink" } }
79 { "action" = "ignore" }
80 { "addresses" = "wildcard" } }
82 { "action" = "listen" }
83 { "addresses" = "127.0.0.1" } }
85 (* Some things needed to process the default ntp.conf on Fedora *)
87 "server 66.187.233.4 # added by /sbin/dhclient-script\n" =
88 { "server" = "66.187.233.4"
89 { "#comment" = "# added by /sbin/dhclient-script" } }
92 "server 0.fedora.pool.ntp.org iburst dynamic\n" =
93 { "server" = "0.fedora.pool.ntp.org" { "iburst" } { "dynamic" } }
96 "restrict 127.0.0.1 \n" =
97 { "restrict" = "127.0.0.1" }
100 "restrict default kod nomodify notrap nopeer noquery\n" =
101 { "restrict" = "default"
103 { "action" = "nomodify" }
104 { "action" = "notrap" }
105 { "action" = "nopeer" }
106 { "action" = "noquery" } }
109 "restrict default kod nomodify notrap nopeer noquery\n"
111 insb "ipv6" "restrict/action[1]" =
112 "restrict -6 default kod nomodify notrap nopeer noquery\n"
115 "restrict -6 default kod nomodify notrap nopeer noquery\n" =
116 { "restrict" = "default"
119 { "action" = "nomodify" }
120 { "action" = "notrap" }
121 { "action" = "nopeer" }
122 { "action" = "noquery" } }
125 "restrict default kod nomodify notrap nopeer noquery\n"
127 insb "ipv4" "restrict/action[1]" =
128 "restrict -4 default kod nomodify notrap nopeer noquery\n"
131 "restrict -4 default notrap nomodify nopeer noquery\n" =
132 { "restrict" = "default"
134 { "action" = "notrap" }
135 { "action" = "nomodify" }
136 { "action" = "nopeer" }
137 { "action" = "noquery" } }
140 "includefile /etc/ntp/crypto/pw\n" =
141 { "includefile" = "/etc/ntp/crypto/pw" }
143 test Ntp.lns get "fudge 127.127.1.0 stratum 10\n" =
144 { "fudge" = "127.127.1.0" { "stratum" = "10" } }
146 test Ntp.lns get "broadcast 192.168.1.255 key 42\n" =
147 { "broadcast" = "192.168.1.255" { "key" = "42" } }
150 test Ntp.lns get "multicastclient 224.0.1.1\n" =
151 { "multicastclient" = "224.0.1.1" }
153 test Ntp.lns put "broadcastclient\tnovolley # broadcast\n"
154 after rm "/*/novolley" = "broadcastclient # broadcast\n"
156 test Ntp.auth_command get "trustedkey 4 8 42\n" =
162 test Ntp.auth_command get "trustedkey 42\n" =
163 { "trustedkey" { "key" = "42" } }
165 test Ntp.lns get "broadcastdelay 0.008\n" =
166 { "broadcastdelay" = "0.008" }
168 test Ntp.lns get "enable auth calibrate\ndisable kernel stats\n" =
171 { "flag" = "calibrate" } }
173 { "flag" = "kernel" }
174 { "flag" = "stats" } }
176 (* Bug #103: tinker directive *)
177 test Ntp.tinker get "tinker panic 0 huffpuff 3.14\n" =
180 { "huffpuff" = "3.14" } }
182 (* Bug #297: tos directive *)
183 test Ntp.tos get "tos maxdist 16\n" =
185 { "maxdist" = "16" } }