diff --git a/manifests/api.pp b/manifests/api.pp index deddb1fb..f3d9397e 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -510,8 +510,8 @@ barbican::rpc_backend are deprecated. Please use barbican::api::default_transpor } if $service_name == 'barbican-api' { - if $::osfamily == 'Debian' { - fail('On Debian family the service_name must be set to httpd as there is no eventlet init script.') + if $::os_package_type == 'ubuntu' { + fail('With Ubuntu packages the service_name must be set to httpd as there is no eventlet init script.') } service { 'barbican-api': ensure => $service_ensure, @@ -531,8 +531,8 @@ barbican::rpc_backend are deprecated. Please use barbican::api::default_transpor } elsif $service_name == 'httpd' { include ::apache::params - # Debian/Ubuntu do not have a barbican-api and this will error out on them. - if $::osfamily == 'RedHat' { + # Ubuntu packages does not have a barbican-api service + if $::os_package_type != 'ubuntu' { service { 'barbican-api': ensure => 'stopped', name => $::barbican::params::api_service_name, diff --git a/manifests/params.pp b/manifests/params.pp index a25d7e37..23c118c5 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -26,6 +26,9 @@ class barbican::params { $httpd_config_file = '/etc/httpd/conf.d/barbican-api.conf' } 'Debian': { + if ($::os_package_type == 'debian') { + $api_service_name = 'barbican-api' + } $api_package_name = 'barbican-api' $worker_package_name = 'barbican-worker' $worker_service_name = 'barbican-worker'