From 685301e7373c33eb6b8d5f9bafd5a7e38ea12675 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 5 Jan 2022 21:51:21 +0900 Subject: [PATCH] Remove usage of custom os_package_type fact Currently we support usage of distro packages only, and this custom fact can be simply replaced by the default fact. Change-Id: Ib8f47ce0bbe34970f9324289210fdb74da6f2098 --- manifests/api.pp | 6 +++--- manifests/wsgi/uwsgi.pp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index cd7660e4..d33ca0a1 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -471,7 +471,7 @@ class barbican::api ( if $service_name == 'barbican-api' or $service_name == $::barbican::params::api_service_name { - if $::os_package_type == 'ubuntu' { + if $::operatingsystem == 'Ubuntu' { fail('With Ubuntu packages the service_name must be set to httpd as there is no eventlet init script.') } @@ -490,7 +490,7 @@ deprecated and will be removed in a future release. Use openstack-barbican-api i } # Debian is using UWSGI, not gunicorn - if $::os_package_type != 'debian' { + if $::operatingsystem != 'Debian' { file_line { 'Modify bind_port in gunicorn-config.py': path => '/etc/barbican/gunicorn-config.py', line => "bind = '${bind_host}:${bind_port}'", @@ -501,7 +501,7 @@ deprecated and will be removed in a future release. Use openstack-barbican-api i } elsif $service_name == 'httpd' { # Ubuntu packages does not have a barbican-api service - if $::os_package_type != 'ubuntu' { + if $::operatingsystem != 'Ubuntu' { service { 'barbican-api': ensure => 'stopped', name => $::barbican::params::api_service_name, diff --git a/manifests/wsgi/uwsgi.pp b/manifests/wsgi/uwsgi.pp index 18784a27..7bf28d73 100644 --- a/manifests/wsgi/uwsgi.pp +++ b/manifests/wsgi/uwsgi.pp @@ -29,7 +29,7 @@ class barbican::wsgi::uwsgi ( include barbican::deps - if $::os_package_type != 'debian'{ + if $::operatingsystem != 'Debian'{ warning('This class is only valid for Debian, as other operating systems are not using uwsgi by default.') }