From f6c1a66e9d902d1cb5122c9756cc9d58f490342e Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 4 Jan 2022 21:16:25 +0900 Subject: [PATCH] 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: I0160bd0b7b8d5495031838119d401e44b3ddf7fa --- manifests/params.pp | 2 -- manifests/wsgi/apache.pp | 14 +------------- .../default-vhost-config-f599feabf2230ace.yaml | 6 ++++++ 3 files changed, 7 insertions(+), 15 deletions(-) create mode 100644 releasenotes/notes/default-vhost-config-f599feabf2230ace.yaml diff --git a/manifests/params.pp b/manifests/params.pp index 1c6b26b2..fae790f9 100644 --- a/manifests/params.pp +++ b/manifests/params.pp @@ -19,7 +19,6 @@ class barbican::params { $keystone_listener_service_name = 'openstack-barbican-keystone-listener' $barbican_wsgi_script_path = '/var/www/cgi-bin/barbican' $barbican_wsgi_script_source = '/usr/bin/barbican-wsgi-api' - $httpd_config_file = '/etc/httpd/conf.d/barbican-api.conf' } 'Debian': { $api_service_name = 'barbican-api' @@ -30,7 +29,6 @@ class barbican::params { $keystone_listener_service_name = 'barbican-keystone-listener' $barbican_wsgi_script_path = '/usr/lib/cgi-bin/barbican' $barbican_wsgi_script_source = '/usr/bin/barbican-wsgi-api' - $httpd_config_file = '/etc/apache2/conf-available/barbican-api.conf' } default: { fail("Unsupported osfamily: ${::osfamily} operating system") diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index a2d8c44b..ba744553 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -138,19 +138,6 @@ class barbican::wsgi::apache ( include barbican::deps include barbican::params - file { $::barbican::params::httpd_config_file: - ensure => present, - content => "# -# This file has been cleaned by Puppet. -# -# OpenStack Barbican configuration has been moved to: -# - ${priority}-barbican_wsgi_main.conf -#", - } - - Anchor['barbican::install::end'] -> File[$::barbican::params::httpd_config_file] - File[$::barbican::params::httpd_config_file] ~> Service['httpd'] - openstacklib::wsgi::apache { 'barbican_wsgi_main': bind_host => $bind_host, bind_port => $public_port, @@ -180,5 +167,6 @@ class barbican::wsgi::apache ( access_log_format => $access_log_format, error_log_file => $error_log_file, custom_wsgi_process_options => $custom_wsgi_process_options, + require => Anchor['barbican::install::end'] } } diff --git a/releasenotes/notes/default-vhost-config-f599feabf2230ace.yaml b/releasenotes/notes/default-vhost-config-f599feabf2230ace.yaml new file mode 100644 index 00000000..f598c475 --- /dev/null +++ b/releasenotes/notes/default-vhost-config-f599feabf2230ace.yaml @@ -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.