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.

Dependencies defined in mistral::wsgi::apache are removed and loosen
to avoid direct deference to resources from puppetlabs-apache. When
httpd is used to run mistral-api, the mistral-service tag is added to
the httpd service, so that it is started during service phase.

Change-Id: Ia6edb3f8ceefa4d2480c33aee7893d7f43166eb9
This commit is contained in:
Takashi Kajinami 2021-12-08 23:04:08 +09:00
parent bad1b0bca7
commit 237975b73a
4 changed files with 0 additions and 36 deletions

View File

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

View File

@ -136,31 +136,6 @@ class mistral::wsgi::apache (
include mistral::deps
include mistral::params
include apache
include apache::mod::wsgi
if $ssl_real {
include apache::mod::ssl
}
# The httpd package is untagged, but needs to have ordering enforced,
# so handle it here rather than in the deps class.
Anchor['mistral::install::begin']
-> Package['httpd']
-> Anchor['mistral::install::end']
# Configure apache during the config phase
Anchor['mistral::config::begin']
-> Apache::Vhost<||>
~> Anchor['mistral::config::end']
# Start the service during the service phase
Anchor['mistral::service::begin']
-> Service['httpd']
-> Anchor['mistral::service::end']
# Notify the service when config changes
Anchor['mistral::config::end']
~> Service['httpd']
::openstacklib::wsgi::apache { 'mistral_wsgi':
bind_host => $bind_host,

View File

@ -1,10 +1,6 @@
{
"author": "OpenStack Contributors",
"dependencies": [
{
"name": "puppetlabs/apache",
"version_requirement": ">=5.0.0"
},
{
"name": "puppetlabs/inifile",
"version_requirement": ">=2.0.0 <6.0.0"

View File

@ -6,9 +6,6 @@ describe 'mistral::wsgi::apache' do
context 'with default parameters' do
it { is_expected.to contain_class('mistral::deps') }
it { is_expected.to contain_class('mistral::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('mistral_wsgi').with(
:bind_port => 8989,
:group => 'mistral',
@ -49,9 +46,6 @@ describe 'mistral::wsgi::apache' do
end
it { is_expected.to contain_class('mistral::deps') }
it { is_expected.to contain_class('mistral::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('mistral_wsgi').with(
:bind_host => '10.42.51.1',
:bind_port => 12345,