Stop replacing the default apache config file

The apache class by default purge all default vhost config files, and
the other modules expect the default files are purged by that behavior.

This change removes the logic to replace the default vhost config file,
which is implemented only in a few modules, to make implementation
of all modules more consistent.

Change-Id: Ia04ceab86e0bd889366eef4860f2d0cf0aa437c8
This commit is contained in:
Takashi Kajinami 2022-01-04 21:31:20 +09:00
parent d58dd177d1
commit 8e3c55d0a0
3 changed files with 7 additions and 17 deletions

View File

@ -20,7 +20,6 @@ class placement::params {
$admin_url = 'http://127.0.0.1/placement'
$wsgi_script_source = '/usr/bin/placement-api'
$wsgi_script_path = '/var/www/cgi-bin/placement'
$httpd_config_file = '/etc/httpd/conf.d/00-placement-api.conf'
}
'Debian': {
$package_name = 'placement-api'
@ -40,7 +39,6 @@ class placement::params {
$admin_url = 'http://127.0.0.1'
$wsgi_script_source = '/usr/bin/placement-api'
$wsgi_script_path = '/usr/lib/cgi-bin/placement'
$httpd_config_file = '/etc/apache2/sites-available/placement-api.conf'
}
default: {
fail("Unsupported osfamily: ${::osfamily} operatingsystem")

View File

@ -133,21 +133,6 @@ class placement::wsgi::apache (
warning('The placement::wsgi::apache::ensure_package parameter is deprecated and has no effect')
}
file { $::placement::params::httpd_config_file:
ensure => present,
content => "#
# This file has been cleaned by Puppet.
#
# OpenStack Placement API configuration has been moved to:
# - ${priority}-placement_wsgi.conf
#",
}
# Ubuntu requires placement-api to be installed before apache to find wsgi script
Package<| title == 'placement-api'|> -> Package<| title == 'httpd'|>
Package<| title == 'placement-api' |>
-> File[$::placement::params::httpd_config_file]
~> Service['httpd']
::openstacklib::wsgi::apache { 'placement_wsgi':
bind_host => $bind_host,
bind_port => $api_port,
@ -176,6 +161,7 @@ class placement::wsgi::apache (
access_log_file => $access_log_file,
access_log_format => $access_log_format,
error_log_file => $error_log_file,
require => Anchor['placement::install::end'],
}
}

View File

@ -0,0 +1,6 @@
---
upgrade:
- |
The default vhost config file is no longer managed. Make sure
the parameters of the ``apache`` class are properly defined and
the default vhost file is deleted.