update
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
; This file contains the information which identifies the deployment state relative to the git repo
|
||||
[default]
|
||||
{{ gitinfo.stdout }}
|
||||
@@ -0,0 +1,27 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# Specify one or more NTP servers.
|
||||
# Use public servers from the pool.ntp.org project.
|
||||
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
|
||||
{% for server in ntp_servers %}
|
||||
server {{ server }}
|
||||
{% endfor %}
|
||||
|
||||
# Record the rate at which the system clock gains/losses time.
|
||||
driftfile /var/lib/chrony/drift
|
||||
|
||||
{% if ntp_tinker_panic is sameas true %}
|
||||
# Force time sync if the drift exceeds the threshold specified
|
||||
# Useful for VMs that can be paused and much later resumed.
|
||||
makestep 1.0 -1
|
||||
{% else %}
|
||||
# Allow the system clock to be stepped in the first three updates
|
||||
# if its offset is larger than 1 second.
|
||||
makestep 1.0 3
|
||||
{% endif %}
|
||||
|
||||
# Enable kernel synchronization of the real-time clock (RTC).
|
||||
rtcsync
|
||||
|
||||
# Specify directory for log files.
|
||||
logdir /var/log/chrony
|
||||
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Prepend resolver options to /etc/resolv.conf after dhclient`
|
||||
# regenerates the file. See man (5) resolver for more details.
|
||||
#
|
||||
if [ $reason = "BOUND" ]; then
|
||||
if [ -n "$new_domain_search" -o -n "$new_domain_name_servers" ]; then
|
||||
RESOLV_CONF=$(cat /etc/resolv.conf | sed -r '/^options (timeout|attempts|ndots).*$/d')
|
||||
OPTIONS="options timeout:{{ dns_timeout|default('2') }} attempts:{{ dns_attempts|default('2') }} ndots:{{ ndots }}"
|
||||
|
||||
printf "%b\n" "$RESOLV_CONF\n$OPTIONS" > /etc/resolv.conf
|
||||
fi
|
||||
fi
|
||||
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Prepend resolver options to /etc/resolv.conf after dhclient`
|
||||
# regenerates the file. See man (5) resolver for more details.
|
||||
#
|
||||
zdnsupdate_config() {
|
||||
if [ -n "$new_domain_search" -o -n "$new_domain_name_servers" ]; then
|
||||
RESOLV_CONF=$(cat /etc/resolv.conf | sed -r '/^options (timeout|attempts|ndots).*$/d')
|
||||
OPTIONS="options timeout:{{ dns_timeout|default('2') }} attempts:{{ dns_attempts|default('2') }} ndots:{{ ndots }}"
|
||||
|
||||
echo -e "$RESOLV_CONF\n$OPTIONS" > /etc/resolv.conf
|
||||
fi
|
||||
}
|
||||
|
||||
zdnsupdate_restore() {
|
||||
:
|
||||
}
|
||||
45
kubespray/roles/kubernetes/preinstall/templates/ntp.conf.j2
Normal file
45
kubespray/roles/kubernetes/preinstall/templates/ntp.conf.j2
Normal file
@@ -0,0 +1,45 @@
|
||||
# {{ ansible_managed }}
|
||||
|
||||
# /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help
|
||||
|
||||
driftfile {{ ntp_driftfile }}
|
||||
|
||||
{% if ntp_tinker_panic is sameas true %}
|
||||
# Always reset the clock, even if the new time is more than 1000s away
|
||||
# from the current system time. Useful for VMs that can be paused
|
||||
# and much later resumed.
|
||||
tinker panic 0
|
||||
{% endif %}
|
||||
|
||||
# Specify one or more NTP servers.
|
||||
# Use public servers from the pool.ntp.org project.
|
||||
# Please consider joining the pool (http://www.pool.ntp.org/join.html).
|
||||
{% for item in ntp_servers %}
|
||||
pool {{ item }}
|
||||
{% endfor %}
|
||||
|
||||
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
|
||||
# details. The web page <http://support.ntp.org/bin/view/Support/AccessRestrictions>
|
||||
# might also be helpful.
|
||||
#
|
||||
# Note that "restrict" applies to both servers and clients, so a configuration
|
||||
# that might be intended to block requests from certain clients could also end
|
||||
# up blocking replies from your own upstream servers.
|
||||
|
||||
# By default, exchange time with everybody, but don't allow configuration.
|
||||
restrict -4 default kod notrap nomodify nopeer noquery limited
|
||||
restrict -6 default kod notrap nomodify nopeer noquery limited
|
||||
|
||||
# Local users may interrogate the ntp server more closely.
|
||||
{% for item in ntp_restrict %}
|
||||
restrict {{ item }}
|
||||
{% endfor %}
|
||||
|
||||
# Needed for adding pool entries
|
||||
restrict source notrap nomodify noquery
|
||||
|
||||
# Disable the monitoring facility to prevent amplification attacks using ntpdc
|
||||
# monlist command when default restrict does not include the noquery flag. See
|
||||
# CVE-2013-5211 for more details.
|
||||
# Note: Monitoring will not be disabled with the limited restriction flag.
|
||||
disable monitor
|
||||
@@ -0,0 +1,10 @@
|
||||
#cloud-config
|
||||
write_files:
|
||||
- path: "/etc/resolv.conf"
|
||||
permissions: "0644"
|
||||
owner: "root"
|
||||
content: |
|
||||
{% for l in cloud_config.stdout_lines %}
|
||||
{{ l }}
|
||||
{% endfor %}
|
||||
#
|
||||
@@ -0,0 +1,21 @@
|
||||
[Resolve]
|
||||
{% if dns_early is sameas true and dns_late is sameas false %}
|
||||
#DNS=
|
||||
{% else %}
|
||||
DNS={{ ([nodelocaldns_ip] if enable_nodelocaldns else coredns_server )| list | join(' ') }}
|
||||
{% endif %}
|
||||
FallbackDNS={{ ( upstream_dns_servers|d([]) + nameservers|d([]) + cloud_resolver|d([])) | unique | join(' ') }}
|
||||
{% if remove_default_searchdomains is sameas false or (remove_default_searchdomains is sameas true and searchdomains|default([])|length==0)%}
|
||||
Domains={{ ([ 'default.svc.' + dns_domain, 'svc.' + dns_domain ] + searchdomains|default([])) | join(' ') }}
|
||||
{% else %}
|
||||
Domains={{ searchdomains|default([]) | join(' ') }}
|
||||
{% endif %}
|
||||
#LLMNR=no
|
||||
#MulticastDNS=no
|
||||
DNSSEC=no
|
||||
Cache=no-negative
|
||||
{% if ansible_os_family in ["Flatcar", "Flatcar Container Linux by Kinvolk"] %}
|
||||
DNSStubListener=no
|
||||
{% else %}
|
||||
#DNSStubListener=yes
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user