mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 13:54:37 +03:00
ntp: add config to filter and set ntp interfaces (#11066)
* ntp: add config to set which interface ntp should listen * Fixed config to only have one variable
This commit is contained in:
@@ -98,6 +98,13 @@ ntp_servers:
|
|||||||
ntp_restrict:
|
ntp_restrict:
|
||||||
- "127.0.0.1"
|
- "127.0.0.1"
|
||||||
- "::1"
|
- "::1"
|
||||||
|
# Specify whether to filter interfaces
|
||||||
|
ntp_filter_interface: false
|
||||||
|
# Specify the interfaces
|
||||||
|
# Only takes effect when ntp_filter_interface is true
|
||||||
|
# ntp_interfaces:
|
||||||
|
# - ignore wildcard
|
||||||
|
# - listen xxx
|
||||||
# The NTP driftfile path
|
# The NTP driftfile path
|
||||||
# Only takes effect when ntp_manage_config is true.
|
# Only takes effect when ntp_manage_config is true.
|
||||||
ntp_driftfile: /var/lib/ntp/ntp.drift
|
ntp_driftfile: /var/lib/ntp/ntp.drift
|
||||||
|
|||||||
@@ -35,6 +35,13 @@ restrict -6 default kod notrap nomodify nopeer noquery limited
|
|||||||
restrict {{ item }}
|
restrict {{ item }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
# Needed for filtering interfaces
|
||||||
|
{% if ntp_filter_interface %}
|
||||||
|
{% for item in ntp_interfaces %}
|
||||||
|
interface {{ item }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
# Needed for adding pool entries
|
# Needed for adding pool entries
|
||||||
restrict source notrap nomodify noquery
|
restrict source notrap nomodify noquery
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user