]> git.donarmstrong.com Git - dsa-puppet.git/blob - modules/ntpdate/templates/etc-default-ntpdate.erb
sudo: replace debbits by publicity
[dsa-puppet.git] / modules / ntpdate / templates / etc-default-ntpdate.erb
1 ##
2 ## THIS FILE IS UNDER PUPPET CONTROL. DON'T EDIT IT HERE.
3 ##
4
5 # The settings in this file are used by the program ntpdate-debian, but not
6 # by the upstream program ntpdate.
7
8 # Set to "yes" to take the server list from /etc/ntp.conf, from package ntp,
9 # so you only have to keep it in one place.
10 NTPDATE_USE_NTP_CONF=no
11
12 # List of NTP servers to use  (Separate multiple servers with spaces.)
13 # Not used if NTPDATE_USE_NTP_CONF is yes.
14 NTPSERVERS=""
15 <%=
16         out = []
17
18         require 'resolv'
19         [scope.lookupvar('ntpservers')].flatten.each do |n|
20                 begin
21                         ip = Resolv.getaddress(n)
22                         out << "NTPSERVERS=\"$NTPSERVERS #{ip}\" # #{n}"
23                 rescue Resolv::ResolvError => e
24                         out << "# Failed to resolve #{n}"
25                 end
26         end
27         out.join("\n")
28 %>
29
30 # Additional options to pass to ntpdate
31 NTPOPTIONS="-u"  # work around broken firewalls