From 248de177dd5c05a2e1d20a1d1c6ea8d8bb65d885 Mon Sep 17 00:00:00 2001 From: Juan Antonio Osorio Robles Date: Wed, 25 Oct 2017 13:21:52 +0300 Subject: [PATCH] Expose allowing setting log files for apache vhost Being able to set the log files for the apache vhost was done in a recent commit [1]. However, that commit missed exposing the configuration in the service-specific manifests. This adds that. [1] Ic2ffef73f6a12d6225f87d285003c3deb7541126 Change-Id: Iae6a86cb93305cb3307e058cfd31e0fca3b1be8e --- manifests/wsgi/apache_api.pp | 18 ++++++++++++++++++ manifests/wsgi/apache_api_cfn.pp | 18 ++++++++++++++++++ manifests/wsgi/apache_api_cloudwatch.pp | 18 ++++++++++++++++++ .../notes/apache-logs-5943a8910ff54db5.yaml | 5 +++++ 4 files changed, 59 insertions(+) create mode 100644 releasenotes/notes/apache-logs-5943a8910ff54db5.yaml diff --git a/manifests/wsgi/apache_api.pp b/manifests/wsgi/apache_api.pp index 84d31313..00850920 100644 --- a/manifests/wsgi/apache_api.pp +++ b/manifests/wsgi/apache_api.pp @@ -61,6 +61,18 @@ # apache::vhost ssl parameters. # Optional. Default to apache::vhost 'ssl_*' defaults. # +# [*access_log_file*] +# The log file name for the virtualhost. +# Optional. Defaults to false. +# +# [*access_log_format*] +# The log format for the virtualhost. +# Optional. Defaults to false. +# +# [*error_log_file*] +# The error log file name for the virtualhost. +# Optional. Defaults to undef. +# # [*custom_wsgi_process_options*] # (optional) gives you the oportunity to add custom process options or to # overwrite the default options for the WSGI main process. @@ -95,6 +107,9 @@ class heat::wsgi::apache_api ( $ssl_certs_dir = undef, $threads = 1, $priority = '10', + $access_log_file = false, + $access_log_format = false, + $error_log_file = undef, $custom_wsgi_process_options = {}, ) { heat::wsgi::apache { 'api': @@ -114,5 +129,8 @@ class heat::wsgi::apache_api ( threads => $threads, custom_wsgi_process_options => $custom_wsgi_process_options, priority => $priority, + access_log_file => $access_log_file, + access_log_format => $access_log_format, + error_log_file => $error_log_file, } } diff --git a/manifests/wsgi/apache_api_cfn.pp b/manifests/wsgi/apache_api_cfn.pp index 6b1754af..a21f1818 100644 --- a/manifests/wsgi/apache_api_cfn.pp +++ b/manifests/wsgi/apache_api_cfn.pp @@ -61,6 +61,18 @@ # apache::vhost ssl parameters. # Optional. Default to apache::vhost 'ssl_*' defaults. # +# [*access_log_file*] +# The log file name for the virtualhost. +# Optional. Defaults to false. +# +# [*access_log_format*] +# The log format for the virtualhost. +# Optional. Defaults to false. +# +# [*error_log_file*] +# The error log file name for the virtualhost. +# Optional. Defaults to undef. +# # [*custom_wsgi_process_options*] # (optional) gives you the oportunity to add custom process options or to # overwrite the default options for the WSGI main process. @@ -95,6 +107,9 @@ class heat::wsgi::apache_api_cfn ( $ssl_certs_dir = undef, $threads = 1, $priority = '10', + $access_log_file = false, + $access_log_format = false, + $error_log_file = undef, $custom_wsgi_process_options = {}, ) { @@ -132,5 +147,8 @@ class heat::wsgi::apache_api_cfn ( # Enforce content-type, see https://bugs.launchpad.net/tripleo/+bug/1641589 vhost_custom_fragment => 'RequestHeader set Content-Type "application/json"', custom_wsgi_process_options => $custom_wsgi_process_options, + access_log_file => $access_log_file, + access_log_format => $access_log_format, + error_log_file => $error_log_file, } } diff --git a/manifests/wsgi/apache_api_cloudwatch.pp b/manifests/wsgi/apache_api_cloudwatch.pp index 01ef8a96..c6a2847e 100644 --- a/manifests/wsgi/apache_api_cloudwatch.pp +++ b/manifests/wsgi/apache_api_cloudwatch.pp @@ -61,6 +61,18 @@ # apache::vhost ssl parameters. # Optional. Default to apache::vhost 'ssl_*' defaults. # +# [*access_log_file*] +# The log file name for the virtualhost. +# Optional. Defaults to false. +# +# [*access_log_format*] +# The log format for the virtualhost. +# Optional. Defaults to false. +# +# [*error_log_file*] +# The error log file name for the virtualhost. +# Optional. Defaults to undef. +# # [*custom_wsgi_process_options*] # (optional) gives you the oportunity to add custom process options or to # overwrite the default options for the WSGI main process. @@ -95,6 +107,9 @@ class heat::wsgi::apache_api_cloudwatch ( $ssl_certs_dir = undef, $threads = 1, $priority = '10', + $access_log_file = false, + $access_log_format = false, + $error_log_file = undef, $custom_wsgi_process_options = {}, ) { heat::wsgi::apache { 'api_cloudwatch': @@ -114,5 +129,8 @@ class heat::wsgi::apache_api_cloudwatch ( threads => $threads, priority => $priority, custom_wsgi_process_options => $custom_wsgi_process_options, + access_log_file => $access_log_file, + access_log_format => $access_log_format, + error_log_file => $error_log_file, } } diff --git a/releasenotes/notes/apache-logs-5943a8910ff54db5.yaml b/releasenotes/notes/apache-logs-5943a8910ff54db5.yaml new file mode 100644 index 00000000..a07d0092 --- /dev/null +++ b/releasenotes/notes/apache-logs-5943a8910ff54db5.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The access_log_file, access_log_format, error_log_file fields for each + apache vhost are now configurable.