Skip to content

Commit 1ce3e73

Browse files
author
Ryan Coleman
committed
Merge pull request #49 from alexjfisher/feature/master/disable_local_clock_for_vms
Omit configuration for a local clock as time source if running on a VM.
2 parents 554692b + 01273c5 commit 1ce3e73

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

templates/ntp.conf.el.erb

+2
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,13 @@ server <%= server %>
3535
#manycastserver 239.255.254.254 # manycast server
3636
#manycastclient 239.255.254.254 key 42 # manycast client
3737

38+
<% if @is_virtual == "false" -%>
3839
# Undisciplined Local Clock. This is a fake driver intended for backup
3940
# and when no outside source of synchronized time is available.
4041
server 127.127.1.0 # local clock
4142
fudge 127.127.1.0 stratum 10
4243

44+
<% end -%>
4345
# Drift file. Put this in a directory which the daemon can write to.
4446
# No symbolic links allowed, either, since the daemon updates the file
4547
# by creating a temporary in the same directory and then rename()'ing

templates/ntp.conf.suse.erb

+2
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,15 @@
2929
##
3030
# server 127.127.8.0 mode 5 prefer
3131

32+
<% if @is_virtual == "false" -%>
3233
##
3334
## Undisciplined Local Clock. This is a fake driver intended for backup
3435
## and when no outside source of synchronized time is available.
3536
##
3637
server 127.127.1.0 # local clock (LCL)
3738
fudge 127.127.1.0 stratum 10 # LCL is unsynchronized
3839

40+
<% end -%>
3941
# Managed by puppet class { "ntp": servers => [ ... ] }
4042
<% [servers_real].flatten.each do |server| -%>
4143
server <%= server %>

0 commit comments

Comments
 (0)