Use new virt factor in time manifest
[mirror/dsa-puppet.git] / modules / time / manifests / init.pp
1 class time {
2         include stdlib
3         $localtimeservers = hiera('local-timeservers', [])
4         $physicalHost = $site::allnodeinfo[$fqdn]['physicalHost']
5
6         # if ($::kernel == 'Linux' and $::is_virtual and $::virtual == 'kvm'
7         #if ($systemd and $physicalHost and size($localtimeservers) > 0) {
8         if ($systemd and size($localtimeservers) > 0 and $::virt == 'kvm') {
9                 include ntp::purge
10                 include systemdtimesyncd
11         } else {
12                 include ntp
13                 include ntpdate
14         }
15 }