Skip to content

Commit

Permalink
Fixed config to only have one variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavan-Gunda committed Apr 10, 2024
1 parent 4756ae4 commit 1b67ecf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions roles/kubernetes/preinstall/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,9 @@ ntp_restrict:
ntp_filter_interface: false
# Specify the interfaces
# Only takes effect when ntp_filter_interface is true
ntp_interfaces:
- ens3
# ntp_interfaces:
# - ignore wildcard
# - listen xxx
# The NTP driftfile path
# Only takes effect when ntp_manage_config is true.
ntp_driftfile: /var/lib/ntp/ntp.drift
Expand Down
6 changes: 3 additions & 3 deletions roles/kubernetes/preinstall/templates/ntp.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ restrict -6 default kod notrap nomodify nopeer noquery limited
restrict {{ item }}
{% endfor %}

# Needed for filtering interfaces
{% if ntp_filter_interface %}
interface ignore wildcard
{% for item in ntp_listen %}
interface listen {{ item }}
{% for item in ntp_interfaces %}
interface {{ item }}
{% endfor %}
{% endif %}

Expand Down

0 comments on commit 1b67ecf

Please sign in to comment.