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: I3b7d44f4de42595817f3c52a4f5e6892baaac187
This commit is contained in:
Takashi Kajinami 2021-12-08 22:17:06 +09:00
parent b5866f1db7
commit 0bafc5e5ac
3 changed files with 0 additions and 17 deletions

View File

@ -109,8 +109,6 @@ class gnocchi::api (
tag => ['gnocchi-service', 'gnocchi-db-sync-service'],
}
} elsif $service_name == 'httpd' {
include apache::params
service { 'gnocchi-api':
ensure => 'stopped',
name => $::gnocchi::params::api_service_name,

View File

@ -136,11 +136,6 @@ class gnocchi::wsgi::apache (
include gnocchi::deps
include gnocchi::params
include apache
include apache::mod::wsgi
if $ssl_real {
include apache::mod::ssl
}
::openstacklib::wsgi::apache { 'gnocchi_wsgi':
bind_host => $bind_host,

View File

@ -5,9 +5,6 @@ describe 'gnocchi::wsgi::apache' do
shared_examples_for 'apache serving gnocchi with mod_wsgi' do
context 'with default parameters' do
it { is_expected.to contain_class('gnocchi::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('gnocchi_wsgi').with(
:bind_port => 8041,
:group => 'gnocchi',
@ -49,9 +46,6 @@ describe 'gnocchi::wsgi::apache' do
end
it { is_expected.to contain_class('gnocchi::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('gnocchi_wsgi').with(
:bind_host => '10.42.51.1',
:bind_port => 12345,
@ -95,15 +89,11 @@ describe 'gnocchi::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/gnocchi',
:wsgi_script_source => '/usr/bin/gnocchi-api'
}
when 'RedHat'
{
:httpd_service_name => 'httpd',
:httpd_ports_file => '/etc/httpd/conf/ports.conf',
:wsgi_script_path => '/var/www/cgi-bin/gnocchi',
:wsgi_script_source => '/usr/bin/gnocchi-api'
}