Tuned ntp.conf for virtual machines
This commit is contained in:
parent
e75b11402c
commit
6cb50c10e8
1 changed files with 7 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
<% if is_virtual == "true" -%>
|
||||||
|
# Don't mind if the virtualized clock appears to be behaving erratically.
|
||||||
|
tinker panic 0
|
||||||
|
|
||||||
|
<% end -%>
|
||||||
# By default, exchange time with everybody, but don't allow configuration.
|
# By default, exchange time with everybody, but don't allow configuration.
|
||||||
restrict -4 default kod notrap nomodify nopeer noquery
|
restrict -4 default kod notrap nomodify nopeer noquery
|
||||||
restrict -6 default kod notrap nomodify nopeer noquery
|
restrict -6 default kod notrap nomodify nopeer noquery
|
||||||
|
@ -13,8 +18,10 @@ driftfile /var/lib/ntp/ntp.drift
|
||||||
<% ntp_server.each do |server| -%>
|
<% ntp_server.each do |server| -%>
|
||||||
server <%= server %>
|
server <%= server %>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
<% if is_virtual == "false" -%>
|
||||||
|
|
||||||
# Undisciplined Local Clock. This is a fake driver intended for backup
|
# Undisciplined Local Clock. This is a fake driver intended for backup
|
||||||
# and when no outside source of synchronized time is available.
|
# and when no outside source of synchronized time is available.
|
||||||
server 127.127.1.0
|
server 127.127.1.0
|
||||||
fudge 127.127.1.0 stratum 10
|
fudge 127.127.1.0 stratum 10
|
||||||
|
<% end -%>
|
||||||
|
|
Loading…
Add table
Reference in a new issue