X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=modules%2Ftime%2Fmanifests%2Finit.pp;h=1900443fde7991e96593221b97f4da4301fd3d50;hb=ff762dfdfbfdb5f5eead0b998c01a6e8feeeac67;hp=1dcd5ead9aa4600aeee680da15b311cb84652208;hpb=6ce2aaa8c4bc079dd726c4d1c8b2519a51fb2da3;p=mirror%2Fdsa-puppet.git diff --git a/modules/time/manifests/init.pp b/modules/time/manifests/init.pp index 1dcd5ead9..1900443fd 100644 --- a/modules/time/manifests/init.pp +++ b/modules/time/manifests/init.pp @@ -1,4 +1,15 @@ class time { - include ntp - include ntpdate + include stdlib + $localtimeservers = hiera('local-timeservers', []) + $physicalHost = $site::allnodeinfo[$fqdn]['physicalHost'] + + # if ($::kernel == 'Linux' and $::is_virtual and $::virtual == 'kvm' + # our is_virtual and virtual facts are broken + if ($systemd and $physicalHost and size($localtimeservers) > 0) { + include ntp::purge + include systemdtimesyncd + } else { + include ntp + include ntpdate + } }