Clean up direct dependencies on puppetlabs-apache

This change removes direct reference to some classes in
puppetlabs-apache. Details are explained below.

- The api class doesn't need access to anything defined in
  apache::params

- The following classes are included by the openstacklib::wsgi::apache
  resource type, and current inclusions are just redundant.

Change-Id: Ib49308e63b18751ac4586f85dbac6d7b2775ca61
This commit is contained in:
Takashi Kajinami 2021-12-08 22:11:35 +09:00
parent cf918ed516
commit b23fdf4ca8
4 changed files with 2 additions and 24 deletions

View File

@ -500,7 +500,6 @@ deprecated and will be removed in a future release. Use openstack-barbican-api i
}
} elsif $service_name == 'httpd' {
include apache::params
# Ubuntu packages does not have a barbican-api service
if $::os_package_type != 'ubuntu' {
service { 'barbican-api':

View File

@ -137,11 +137,6 @@ class barbican::wsgi::apache (
include barbican::deps
include barbican::params
include apache
include apache::mod::wsgi
if $ssl_real {
include apache::mod::ssl
}
file { $::barbican::params::httpd_config_file:
ensure => present,

View File

@ -1,10 +1,6 @@
{
"author": "OpenStack Contributors",
"dependencies": [
{
"name": "puppetlabs/apache",
"version_requirement": ">=5.0.0"
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">=2.0.0 <6.0.0"

View File

@ -24,9 +24,6 @@ describe 'barbican::wsgi::apache' do
shared_examples_for 'apache serving barbican with mod_wsgi' do
context 'with default parameters' do
it { is_expected.to contain_class('barbican::params') }
it { is_expected.to contain_class('apache') }
it { is_expected.to contain_class('apache::mod::wsgi') }
it { is_expected.to contain_class('apache::mod::ssl') }
it { is_expected.to contain_openstacklib__wsgi__apache('barbican_wsgi_main').with(
:bind_port => 9311,
:group => 'barbican',
@ -66,9 +63,6 @@ describe 'barbican::wsgi::apache' do
}
end
it { is_expected.to contain_class('barbican::params') }
it { is_expected.to contain_class('apache') }
it { is_expected.to contain_class('apache::mod::wsgi') }
it { is_expected.to_not contain_class('apache::mod::ssl') }
it { is_expected.to contain_openstacklib__wsgi__apache('barbican_wsgi_main').with(
:bind_host => '10.42.51.1',
:bind_port => 12345,
@ -111,17 +105,11 @@ describe 'barbican::wsgi::apache' do
case facts[:osfamily]
when 'Debian'
{
:httpd_service_name => 'apache2',
:httpd_ports_file => '/etc/apache2/ports.conf',
:wsgi_script_path => '/usr/lib/cgi-bin/barbican',
:httpd_config_file => '/etc/apache2/conf-available/barbican-api.conf',
:wsgi_script_path => '/usr/lib/cgi-bin/barbican',
}
when 'RedHat'
{
:httpd_service_name => 'httpd',
:httpd_ports_file => '/etc/httpd/conf/ports.conf',
:wsgi_script_path => '/var/www/cgi-bin/barbican',
:httpd_config_file => '/etc/httpd/conf.d/barbican-api.conf',
:wsgi_script_path => '/var/www/cgi-bin/barbican',
}
end
end