Merge "Autodeployer support for ODL Plugin installation + Fuel 6.1"
[genesis.git] / fuel / build / f_ntp / puppet / modules / opnfv / manifests / ntp.pp
index 8180e3d..c5dce1b 100644 (file)
@@ -31,6 +31,15 @@ class opnfv::ntp(
   $file='/etc/ntp.conf'
 ) {
 
+  case $::operatingsystem {
+        centos, redhat: {
+          $service_name = 'ntpd'
+        }
+        debian, ubuntu: {
+          $service_name = 'ntp'
+        }
+  }
+
   if $::fuel_settings['role'] {
     if ($::fuel_settings['opnfv'] and
     $::fuel_settings['opnfv']['ntp']) {
@@ -63,9 +72,9 @@ class opnfv::ntp(
 
     service { 'ntp':
       ensure  => running,
+      name    => $service_name,
       enable  => true,
       require => [ Package['ntp'], File[$file]]
     }
   }
 }
-