Cleanup compat code for puppet <4.5

... because we no longer support puppet 4.

Change-Id: I80b8ee9c6bcff7e3985f5135123430e4f269849c
This commit is contained in:
Takashi Kajinami 2020-06-04 21:47:07 +09:00
parent 8e6e6c3aa6
commit c0d0bcf3d8
2 changed files with 13 additions and 26 deletions

View File

@ -61,20 +61,18 @@ class nova::compute::libvirt::services (
tag => ['openstack', 'nova-support-package'],
}
service { 'libvirt' :
ensure => running,
enable => true,
name => $libvirt_service_name,
provider => $::nova::params::special_service_provider,
require => Anchor['nova::install::end'],
ensure => running,
enable => true,
name => $libvirt_service_name,
require => Anchor['nova::install::end'],
}
# messagebus
if($::osfamily == 'RedHat' and $::operatingsystem != 'Fedora') {
service { 'messagebus':
ensure => running,
enable => true,
name => $::nova::params::messagebus_service_name,
provider => $::nova::params::special_service_provider,
ensure => running,
enable => true,
name => $::nova::params::messagebus_service_name,
}
Package['libvirt'] -> Service['messagebus'] -> Service['libvirt']
}
@ -86,20 +84,18 @@ class nova::compute::libvirt::services (
if $virtlock_service_name {
service { 'virtlockd':
ensure => running,
enable => true,
name => $virtlock_service_name,
provider => $::nova::params::special_service_provider,
ensure => running,
enable => true,
name => $virtlock_service_name,
}
Package<| name == 'libvirt' |> -> Service['virtlockd']
}
if $virtlog_service_name {
service { 'virtlogd':
ensure => running,
enable => true,
name => $virtlog_service_name,
provider => $::nova::params::special_service_provider,
ensure => running,
enable => true,
name => $virtlog_service_name,
}
Package<| name == 'libvirt' |> -> Service['virtlogd']
}

View File

@ -55,19 +55,12 @@ class nova::params {
'RedHat', 'CentOS', 'Scientific', 'OracleLinux': {
if (versioncmp($::operatingsystemmajrelease, '7') < 0) {
$messagebus_service_name = 'messagebus'
$special_service_provider = undef
} else {
if (versioncmp($::puppetversion, '4.5') < 0) {
$special_service_provider = 'redhat'
} else {
$special_service_provider = undef
}
$messagebus_service_name = 'dbus'
}
}
default: {
# not required on Fedora
$special_service_provider = undef
$messagebus_service_name = undef
}
}
@ -116,7 +109,6 @@ class nova::params {
$vncproxy_package_name = 'nova-consoleproxy'
$serialproxy_package_name = 'nova-consoleproxy'
# Use default provider on Debian
$special_service_provider = undef
$virtlock_service_name = 'virtlockd'
$virtlog_service_name = 'virtlogd'
}
@ -127,7 +119,6 @@ class nova::params {
$vncproxy_package_name = 'nova-novncproxy'
$serialproxy_package_name = 'nova-serialproxy'
# Use default provider on Debian
$special_service_provider = undef
$virtlock_service_name = 'virtlockd'
$virtlog_service_name = 'virtlogd'
}