Debian: fix barbican-api setup
Currently, it's not possible to use eventlet in Debian because the test has been made on $::osfamily == 'Debian' instead of $::os_package_type. Also, in Debian, the barbican-api service was never stopped before configuring Apache, therefore, starting Apache just failed. This patch also adds the $::barbican::params::api_service_name var if using Debian packages. Change-Id: Ide559f8fdc58ed3539325acd6696cec23c3de65b
This commit is contained in:

committed by
Tobias Urdin

parent
641d9b6772
commit
dea80f2eb9
@@ -510,8 +510,8 @@ barbican::rpc_backend are deprecated. Please use barbican::api::default_transpor
|
|||||||
}
|
}
|
||||||
|
|
||||||
if $service_name == 'barbican-api' {
|
if $service_name == 'barbican-api' {
|
||||||
if $::osfamily == 'Debian' {
|
if $::os_package_type == 'ubuntu' {
|
||||||
fail('On Debian family the service_name must be set to httpd as there is no eventlet init script.')
|
fail('With Ubuntu packages the service_name must be set to httpd as there is no eventlet init script.')
|
||||||
}
|
}
|
||||||
service { 'barbican-api':
|
service { 'barbican-api':
|
||||||
ensure => $service_ensure,
|
ensure => $service_ensure,
|
||||||
@@ -531,8 +531,8 @@ barbican::rpc_backend are deprecated. Please use barbican::api::default_transpor
|
|||||||
|
|
||||||
} elsif $service_name == 'httpd' {
|
} elsif $service_name == 'httpd' {
|
||||||
include ::apache::params
|
include ::apache::params
|
||||||
# Debian/Ubuntu do not have a barbican-api and this will error out on them.
|
# Ubuntu packages does not have a barbican-api service
|
||||||
if $::osfamily == 'RedHat' {
|
if $::os_package_type != 'ubuntu' {
|
||||||
service { 'barbican-api':
|
service { 'barbican-api':
|
||||||
ensure => 'stopped',
|
ensure => 'stopped',
|
||||||
name => $::barbican::params::api_service_name,
|
name => $::barbican::params::api_service_name,
|
||||||
|
@@ -26,6 +26,9 @@ class barbican::params {
|
|||||||
$httpd_config_file = '/etc/httpd/conf.d/barbican-api.conf'
|
$httpd_config_file = '/etc/httpd/conf.d/barbican-api.conf'
|
||||||
}
|
}
|
||||||
'Debian': {
|
'Debian': {
|
||||||
|
if ($::os_package_type == 'debian') {
|
||||||
|
$api_service_name = 'barbican-api'
|
||||||
|
}
|
||||||
$api_package_name = 'barbican-api'
|
$api_package_name = 'barbican-api'
|
||||||
$worker_package_name = 'barbican-worker'
|
$worker_package_name = 'barbican-worker'
|
||||||
$worker_service_name = 'barbican-worker'
|
$worker_service_name = 'barbican-worker'
|
||||||
|
Reference in New Issue
Block a user