From c1d494adfa7a2edafcf6036a4747b279e8898c34 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 8 Dec 2021 22:31:47 +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: Id18b54f34c4ad42c62bbb77315a42bbf844493d2 --- manifests/api.pp | 1 - manifests/wsgi/apache.pp | 6 +----- spec/classes/magnum_wsgi_apache_spec.rb | 6 ------ 3 files changed, 1 insertion(+), 12 deletions(-) diff --git a/manifests/api.pp b/manifests/api.pp index aeffc99..c1847c1 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -139,7 +139,6 @@ class magnum::api( tag => 'magnum-service', } } elsif $service_name == 'httpd' { - include apache::params service { 'magnum-api': ensure => 'stopped', name => $::magnum::params::api_service, diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index 2f52428..e9c96cd 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -117,11 +117,7 @@ class magnum::wsgi::apache ( include magnum::deps include magnum::params - include apache - include apache::mod::wsgi - if $ssl { - include apache::mod::ssl - } + ::openstacklib::wsgi::apache { 'magnum_wsgi': bind_host => $bind_host, bind_port => $port, diff --git a/spec/classes/magnum_wsgi_apache_spec.rb b/spec/classes/magnum_wsgi_apache_spec.rb index 22766b1..d78b10b 100644 --- a/spec/classes/magnum_wsgi_apache_spec.rb +++ b/spec/classes/magnum_wsgi_apache_spec.rb @@ -5,9 +5,6 @@ describe 'magnum::wsgi::apache' do shared_examples_for 'apache serving magnum with mod_wsgi' do context 'with default parameters' do 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( :bind_port => 9511, :group => 'magnum', @@ -46,9 +43,6 @@ describe 'magnum::wsgi::apache' do } end 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( :bind_host => '10.42.51.1', :bind_port => 12345,