diff options
author | Ryan Coleman <ryan@puppetlabs.com> | 2013-04-04 13:32:15 -0700 |
---|---|---|
committer | Ryan Coleman <ryan@puppetlabs.com> | 2013-04-04 13:32:15 -0700 |
commit | 1ce3e73c44d75c2d067e864d743f9637559f71cf (patch) | |
tree | 0eac7da8831a9e9b11d9e5fb16ceb8573f6af4c8 | |
parent | 554692be65611d5cd0e7f0de3897319188941990 (diff) | |
parent | 01273c53f1cf2015c3ff5a9f704828225d900e03 (diff) |
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.
-rw-r--r-- | templates/ntp.conf.el.erb | 2 | ||||
-rw-r--r-- | templates/ntp.conf.suse.erb | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/templates/ntp.conf.el.erb b/templates/ntp.conf.el.erb index 80b358b..b981511 100644 --- a/templates/ntp.conf.el.erb +++ b/templates/ntp.conf.el.erb @@ -35,11 +35,13 @@ server <%= server %> #manycastserver 239.255.254.254 # manycast server #manycastclient 239.255.254.254 key 42 # manycast client +<% if @is_virtual == "false" -%> # Undisciplined Local Clock. This is a fake driver intended for backup # and when no outside source of synchronized time is available. server 127.127.1.0 # local clock fudge 127.127.1.0 stratum 10 +<% end -%> # Drift file. Put this in a directory which the daemon can write to. # No symbolic links allowed, either, since the daemon updates the file # by creating a temporary in the same directory and then rename()'ing diff --git a/templates/ntp.conf.suse.erb b/templates/ntp.conf.suse.erb index b25aac2..e24ec83 100644 --- a/templates/ntp.conf.suse.erb +++ b/templates/ntp.conf.suse.erb @@ -29,6 +29,7 @@ ## # server 127.127.8.0 mode 5 prefer +<% if @is_virtual == "false" -%> ## ## Undisciplined Local Clock. This is a fake driver intended for backup ## and when no outside source of synchronized time is available. @@ -36,6 +37,7 @@ server 127.127.1.0 # local clock (LCL) fudge 127.127.1.0 stratum 10 # LCL is unsynchronized +<% end -%> # Managed by puppet class { "ntp": servers => [ ... ] } <% [servers_real].flatten.each do |server| -%> server <%= server %> |