[ntp]: Fix NTP sync while using DHCP (#1035)
This commit is contained in:
parent
1a748ee0bb
commit
118c2dd39d
@ -29,9 +29,13 @@ server {{ ntp_server }} iburst
|
|||||||
|
|
||||||
#only listen on localhost and eth0 ips (default is to listen on all ip addresses)
|
#only listen on localhost and eth0 ips (default is to listen on all ip addresses)
|
||||||
interface ignore wildcard
|
interface ignore wildcard
|
||||||
|
{% if MGMT_INTERFACE %}
|
||||||
{% for (mgmt_intf, mgmt_prefix) in MGMT_INTERFACE %}
|
{% for (mgmt_intf, mgmt_prefix) in MGMT_INTERFACE %}
|
||||||
interface listen {{ mgmt_prefix | ip }}
|
interface listen {{ mgmt_prefix | ip }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
{% else %}
|
||||||
|
interface listen eth0
|
||||||
|
{% endif %}
|
||||||
interface listen 127.0.0.1
|
interface listen 127.0.0.1
|
||||||
|
|
||||||
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
|
# Access control configuration; see /usr/share/doc/ntp-doc/html/accopt.html for
|
||||||
|
Loading…
Reference in New Issue
Block a user