|
| 1 | +################################################################################ |
| 2 | +## /etc/ntp.conf |
| 3 | +## |
| 4 | +## Sample NTP configuration file. |
| 5 | +## See package 'ntp-doc' for documentation, Mini-HOWTO and FAQ. |
| 6 | +## Copyright (c) 1998 S.u.S.E. GmbH Fuerth, Germany. |
| 7 | +## |
| 8 | +## Author: Michael Andres, <ma@suse.de> |
| 9 | +## Michael Skibbe, <mskibbe@suse.de> |
| 10 | +## |
| 11 | +################################################################################ |
| 12 | + |
| 13 | +## |
| 14 | +## Radio and modem clocks by convention have addresses in the |
| 15 | +## form 127.127.t.u, where t is the clock type and u is a unit |
| 16 | +## number in the range 0-3. |
| 17 | +## |
| 18 | +## Most of these clocks require support in the form of a |
| 19 | +## serial port or special bus peripheral. The particular |
| 20 | +## device is normally specified by adding a soft link |
| 21 | +## /dev/device-u to the particular hardware device involved, |
| 22 | +## where u correspond to the unit number above. |
| 23 | +## |
| 24 | +## Generic DCF77 clock on serial port (Conrad DCF77) |
| 25 | +## Address: 127.127.8.u |
| 26 | +## Serial Port: /dev/refclock-u |
| 27 | +## |
| 28 | +## (create soft link /dev/refclock-0 to the particular ttyS?) |
| 29 | +## |
| 30 | +# server 127.127.8.0 mode 5 prefer |
| 31 | + |
| 32 | +## |
| 33 | +## Undisciplined Local Clock. This is a fake driver intended for backup |
| 34 | +## and when no outside source of synchronized time is available. |
| 35 | +## |
| 36 | +server 127.127.1.0 # local clock (LCL) |
| 37 | +fudge 127.127.1.0 stratum 10 # LCL is unsynchronized |
| 38 | + |
| 39 | +# Managed by puppet class { "ntp": servers => [ ... ] } |
| 40 | +<% [servers_real].flatten.each do |server| -%> |
| 41 | +server <%= server %> |
| 42 | +<% end -%> |
| 43 | + |
| 44 | +<% if @is_virtual == "true" -%> |
| 45 | +# Keep ntpd from panicking in the event of a large clock skew |
| 46 | +# when a VM guest is suspended and resumed. |
| 47 | +tinker panic 0 |
| 48 | + |
| 49 | +<% end -%> |
| 50 | +## |
| 51 | +## Miscellaneous stuff |
| 52 | +## |
| 53 | + |
| 54 | +driftfile /var/lib/ntp/drift/ntp.drift # path for drift file |
| 55 | + |
| 56 | +logfile /var/log/ntp # alternate log file |
| 57 | +# logconfig =syncstatus + sysevents |
| 58 | +# logconfig =all |
| 59 | + |
| 60 | +# statsdir /tmp/ # directory for statistics files |
| 61 | +# filegen peerstats file peerstats type day enable |
| 62 | +# filegen loopstats file loopstats type day enable |
| 63 | +# filegen clockstats file clockstats type day enable |
| 64 | + |
| 65 | +<% if @restrict -%> |
| 66 | +# Permit time synchronization with our time source, but do not |
| 67 | +# permit the source to query or modify the service on this system. |
| 68 | +restrict -4 default kod nomodify notrap nopeer noquery |
| 69 | +restrict -6 default kod nomodify notrap nopeer noquery |
| 70 | + |
| 71 | +# Permit all access over the loopback interface. This could |
| 72 | +# be tightened as well, but to do so would effect some of |
| 73 | +# the administrative functions. |
| 74 | +restrict 127.0.0.1 |
| 75 | +restrict -6 ::1 |
| 76 | + |
| 77 | +<% end -%> |
| 78 | + |
| 79 | +# |
| 80 | +# Authentication stuff |
| 81 | +# |
| 82 | +keys /etc/ntp.keys # path for keys file |
| 83 | +trustedkey 1 # define trusted keys |
| 84 | +requestkey 1 # key (7) for accessing server variables |
| 85 | +# controlkey 15 # key (6) for accessing server variables |
0 commit comments