From ee4d51197f175d03a4edd2c9af2188f5df2d8aa2 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Thu, 10 Aug 2023 02:13:41 +0900 Subject: [PATCH] apache: Expose setenv The setenv option needs customization in case neutron api is run by httpd + mod_wsgi and additional config files should be loaded. Change-Id: I3880954896917dde0e13f69685a560db8589ec0e --- manifests/wsgi/apache.pp | 6 ++++++ releasenotes/notes/wsgi-apache-setenv-3d710d074459a9c1.yaml | 4 ++++ spec/classes/neutron_wsgi_apache_spec.rb | 1 + 3 files changed, 11 insertions(+) create mode 100644 releasenotes/notes/wsgi-apache-setenv-3d710d074459a9c1.yaml diff --git a/manifests/wsgi/apache.pp b/manifests/wsgi/apache.pp index f4aba7e16..ae277e77e 100644 --- a/manifests/wsgi/apache.pp +++ b/manifests/wsgi/apache.pp @@ -50,6 +50,10 @@ # (optional) The priority for the vhost. # Defaults to 10 # +# [*setenv*] +# (optional) Set environment variables for the vhost. +# Defaults to [] +# # [*threads*] # (optional) The number of threads for the vhost. # Defaults to 1 @@ -139,6 +143,7 @@ class neutron::wsgi::apache ( $wsgi_process_display_name = undef, $threads = 1, $priority = 10, + $setenv = [], $access_log_file = undef, $access_log_pipe = undef, $access_log_syslog = undef, @@ -162,6 +167,7 @@ class neutron::wsgi::apache ( group => $::neutron::params::group, path => $path, priority => $priority, + setenv => $setenv, servername => $servername, ssl => $ssl, ssl_ca => $ssl_ca, diff --git a/releasenotes/notes/wsgi-apache-setenv-3d710d074459a9c1.yaml b/releasenotes/notes/wsgi-apache-setenv-3d710d074459a9c1.yaml new file mode 100644 index 000000000..bab7cedfa --- /dev/null +++ b/releasenotes/notes/wsgi-apache-setenv-3d710d074459a9c1.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The new ``neutron::wsgi::apache::setenv`` parameter has been added. diff --git a/spec/classes/neutron_wsgi_apache_spec.rb b/spec/classes/neutron_wsgi_apache_spec.rb index 0a36ca2e6..bab2d52cb 100644 --- a/spec/classes/neutron_wsgi_apache_spec.rb +++ b/spec/classes/neutron_wsgi_apache_spec.rb @@ -9,6 +9,7 @@ describe 'neutron::wsgi::apache' do :group => 'neutron', :path => '/', :priority => 10, + :setenv => [], :servername => 'foo.example.com', :ssl => false, :threads => 1,