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: I88684f7f246b226844dc724a35d1cec95742704e
This commit is contained in:
Takashi Kajinami 2021-12-09 00:25:55 +09:00
parent a06217b838
commit 43105f3130
4 changed files with 6 additions and 21 deletions

View File

@ -105,7 +105,6 @@ class heat::api (
tag => 'heat-service',
}
} elsif $service_name == 'httpd' {
include apache::params
service { 'heat-api':
ensure => 'stopped',
name => $::heat::params::api_service_name,

View File

@ -108,7 +108,6 @@ class heat::api_cfn (
tag => 'heat-service',
}
} elsif $service_name == 'httpd' {
include apache::params
service { 'heat-api-cfn':
ensure => 'stopped',
name => $::heat::params::api_cfn_service_name,

View File

@ -142,11 +142,6 @@ define heat::wsgi::apache (
include heat::deps
include heat::params
include apache
include apache::mod::wsgi
if $ssl_real {
include apache::mod::ssl
}
::openstacklib::wsgi::apache { "heat_${title}_wsgi":
bind_host => $bind_host,

View File

@ -14,9 +14,6 @@ describe 'heat::wsgi::apache' do
let (:title) { 'api' }
it { is_expected.to contain_class('heat::deps') }
it { is_expected.to contain_class('heat::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') }
context 'with default parameters' do
it { is_expected.to contain_openstacklib__wsgi__apache("heat_#{title}_wsgi").with(
@ -32,7 +29,6 @@ describe 'heat::wsgi::apache' do
'allow_encoded_slashes' => 'on',
'request_headers' => nil,
)}
it { is_expected.to contain_concat("#{platform_params[:httpd_ports_file]}") }
end
context 'with bind host' do
@ -86,18 +82,14 @@ describe 'heat::wsgi::apache' do
let(:platform_params) do
case facts[:osfamily]
when 'Debian'
{ :httpd_service_name => 'apache2',
:httpd_ports_file => '/etc/apache2/ports.conf',
:wsgi_script_dir => '/usr/lib/cgi-bin/heat',
:script_source_api => '/usr/bin/heat-wsgi-api',
:script_source_cfn => '/usr/bin/heat-wsgi-api-cfn',
{ :wsgi_script_dir => '/usr/lib/cgi-bin/heat',
:script_source_api => '/usr/bin/heat-wsgi-api',
:script_source_cfn => '/usr/bin/heat-wsgi-api-cfn',
}
when 'RedHat'
{ :httpd_service_name => 'httpd',
:httpd_ports_file => '/etc/httpd/conf/ports.conf',
:wsgi_script_dir => '/var/www/cgi-bin/heat',
:script_source_api => '/usr/bin/heat-wsgi-api',
:script_source_cfn => '/usr/bin/heat-wsgi-api-cfn',
{ :wsgi_script_dir => '/var/www/cgi-bin/heat',
:script_source_api => '/usr/bin/heat-wsgi-api',
:script_source_cfn => '/usr/bin/heat-wsgi-api-cfn',
}
end
end