From 3fdf991c968985852ec7a1d50c11093aec92f254 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 8 Dec 2021 22:51:16 +0900 Subject: [PATCH] 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: Icfba1830c3718cacaf2c9d410554fa826b6d574c --- manifests/service/api.pp | 2 -- manifests/wsgi/apache.pp | 5 ----- spec/classes/sahara_wsgi_apache_spec.rb | 6 ------ 3 files changed, 13 deletions(-) diff --git a/manifests/service/api.pp b/manifests/service/api.pp index 887ef75a..c1bd3636 100644 --- a/manifests/service/api.pp +++ b/manifests/service/api.pp @@ -73,8 +73,6 @@ class sahara::service::api ( tag => 'sahara-service', } } elsif $service_name == 'httpd' { - include apache::params - if $::operatingsystem != 'Ubuntu' { service { 'sahara-api': ensure => 'stopped', diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 8e2c69f0..d02e0db5 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -117,11 +117,6 @@ class sahara::wsgi::apache ( include sahara::deps include sahara::params - include apache - include apache::mod::wsgi - if $ssl { - include apache::mod::ssl - } ::openstacklib::wsgi::apache { 'sahara_wsgi': bind_host => $bind_host, diff --git a/spec/classes/sahara_wsgi_apache_spec.rb b/spec/classes/sahara_wsgi_apache_spec.rb index f56efdf5..d37c4346 100644 --- a/spec/classes/sahara_wsgi_apache_spec.rb +++ b/spec/classes/sahara_wsgi_apache_spec.rb @@ -7,9 +7,6 @@ describe 'sahara::wsgi::apache' do it { should contain_class('sahara::deps') should contain_class('sahara::params') - should contain_class('apache') - should contain_class('apache::mod::wsgi') - should_not contain_class('apache::mod::ssl') } it { should contain_openstacklib__wsgi__apache('sahara_wsgi').with( @@ -83,7 +80,6 @@ describe 'sahara::wsgi::apache' do } end - it { should contain_class('apache::mod::ssl') } it { should contain_openstacklib__wsgi__apache('sahara_wsgi').with_ssl(true) } end end @@ -104,13 +100,11 @@ describe 'sahara::wsgi::apache' do case facts[:osfamily] when 'Debian' { - :httpd_service_name => 'apache2', :wsgi_script_path => '/usr/lib/cgi-bin/sahara', :wsgi_script_source => '/usr/bin/sahara-wsgi-api' } when 'RedHat' { - :httpd_service_name => 'httpd', :wsgi_script_path => '/var/www/cgi-bin/sahara', :wsgi_script_source => '/usr/bin/sahara-wsgi-api' }