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: Id18b54f34c4ad42c62bbb77315a42bbf844493d2
This commit is contained in:
Takashi Kajinami 2021-12-08 22:31:47 +09:00
parent d9224f45f9
commit c1d494adfa
3 changed files with 1 additions and 12 deletions

View File

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

View File

@ -117,11 +117,7 @@ class magnum::wsgi::apache (
include magnum::deps include magnum::deps
include magnum::params include magnum::params
include apache
include apache::mod::wsgi
if $ssl {
include apache::mod::ssl
}
::openstacklib::wsgi::apache { 'magnum_wsgi': ::openstacklib::wsgi::apache { 'magnum_wsgi':
bind_host => $bind_host, bind_host => $bind_host,
bind_port => $port, bind_port => $port,

View File

@ -5,9 +5,6 @@ describe 'magnum::wsgi::apache' do
shared_examples_for 'apache serving magnum with mod_wsgi' do shared_examples_for 'apache serving magnum with mod_wsgi' do
context 'with default parameters' do context 'with default parameters' do
it { is_expected.to contain_class('magnum::params') } it { is_expected.to contain_class('magnum::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('magnum_wsgi').with( it { is_expected.to contain_openstacklib__wsgi__apache('magnum_wsgi').with(
:bind_port => 9511, :bind_port => 9511,
:group => 'magnum', :group => 'magnum',
@ -46,9 +43,6 @@ describe 'magnum::wsgi::apache' do
} }
end end
it { is_expected.to contain_class('magnum::params') } it { is_expected.to contain_class('magnum::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('magnum_wsgi').with( it { is_expected.to contain_openstacklib__wsgi__apache('magnum_wsgi').with(
:bind_host => '10.42.51.1', :bind_host => '10.42.51.1',
:bind_port => 12345, :bind_port => 12345,