Allow setting log files for apache vhost
This allows the setting of the error and access file logs, as well as the access log format. This was done in a similar fashion as one can configure these ones in the keystone wsgi manifest. Change-Id: I1315c67451a7a7046a4a29a0734c8ee3d579ad58
This commit is contained in:
		
				
					committed by
					
						
						Mohammed Naser
					
				
			
			
				
	
			
			
			
						parent
						
							2cd360dd6d
						
					
				
				
					commit
					0a53bd7a37
				
			@@ -66,6 +66,18 @@
 | 
				
			|||||||
#     apache::vhost ssl parameters.
 | 
					#     apache::vhost ssl parameters.
 | 
				
			||||||
#     Optional. Default to apache::vhost 'ssl_*' defaults.
 | 
					#     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*]
 | 
					#   [*custom_wsgi_process_options*]
 | 
				
			||||||
#     (optional) gives you the oportunity to add custom process options or to
 | 
					#     (optional) gives you the oportunity to add custom process options or to
 | 
				
			||||||
#     overwrite the default options for the WSGI main process.
 | 
					#     overwrite the default options for the WSGI main process.
 | 
				
			||||||
@@ -101,6 +113,9 @@ class cloudkitty::wsgi::apache (
 | 
				
			|||||||
  $wsgi_process_display_name   = undef,
 | 
					  $wsgi_process_display_name   = undef,
 | 
				
			||||||
  $threads                     = $::os_workers,
 | 
					  $threads                     = $::os_workers,
 | 
				
			||||||
  $priority                    = '10',
 | 
					  $priority                    = '10',
 | 
				
			||||||
 | 
					  $access_log_file             = false,
 | 
				
			||||||
 | 
					  $access_log_format           = false,
 | 
				
			||||||
 | 
					  $error_log_file              = undef,
 | 
				
			||||||
  $custom_wsgi_process_options = {},
 | 
					  $custom_wsgi_process_options = {},
 | 
				
			||||||
) {
 | 
					) {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -137,6 +152,9 @@ class cloudkitty::wsgi::apache (
 | 
				
			|||||||
    wsgi_script_file            => 'app',
 | 
					    wsgi_script_file            => 'app',
 | 
				
			||||||
    wsgi_script_source          => $::cloudkitty::params::cloudkitty_wsgi_script_source,
 | 
					    wsgi_script_source          => $::cloudkitty::params::cloudkitty_wsgi_script_source,
 | 
				
			||||||
    custom_wsgi_process_options => $custom_wsgi_process_options,
 | 
					    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,
 | 
				
			||||||
    require                     => Anchor['cloudkitty::install::end'],
 | 
					    require                     => Anchor['cloudkitty::install::end'],
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -23,6 +23,8 @@ describe 'cloudkitty::wsgi::apache' do
 | 
				
			|||||||
        :wsgi_script_file            => 'app',
 | 
					        :wsgi_script_file            => 'app',
 | 
				
			||||||
        :wsgi_script_source          => platform_params[:wsgi_script_source],
 | 
					        :wsgi_script_source          => platform_params[:wsgi_script_source],
 | 
				
			||||||
        :custom_wsgi_process_options => {},
 | 
					        :custom_wsgi_process_options => {},
 | 
				
			||||||
 | 
					        :access_log_file             => false,
 | 
				
			||||||
 | 
					        :access_log_format           => false,
 | 
				
			||||||
      )}
 | 
					      )}
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -38,6 +40,9 @@ describe 'cloudkitty::wsgi::apache' do
 | 
				
			|||||||
          :custom_wsgi_process_options => {
 | 
					          :custom_wsgi_process_options => {
 | 
				
			||||||
            'python_path' => '/my/python/admin/path',
 | 
					            'python_path' => '/my/python/admin/path',
 | 
				
			||||||
          },
 | 
					          },
 | 
				
			||||||
 | 
					          :access_log_file             => '/var/log/httpd/access_log',
 | 
				
			||||||
 | 
					          :access_log_format           => 'some format',
 | 
				
			||||||
 | 
					          :error_log_file              => '/var/log/httpd/error_log'
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
      end
 | 
					      end
 | 
				
			||||||
      it { is_expected.to contain_class('cloudkitty::params') }
 | 
					      it { is_expected.to contain_class('cloudkitty::params') }
 | 
				
			||||||
@@ -63,6 +68,9 @@ describe 'cloudkitty::wsgi::apache' do
 | 
				
			|||||||
        :custom_wsgi_process_options => {
 | 
					        :custom_wsgi_process_options => {
 | 
				
			||||||
          'python_path'  => '/my/python/admin/path',
 | 
					          'python_path'  => '/my/python/admin/path',
 | 
				
			||||||
        },
 | 
					        },
 | 
				
			||||||
 | 
					        :access_log_file             => '/var/log/httpd/access_log',
 | 
				
			||||||
 | 
					        :access_log_format           => 'some format',
 | 
				
			||||||
 | 
					        :error_log_file              => '/var/log/httpd/error_log'
 | 
				
			||||||
      )}
 | 
					      )}
 | 
				
			||||||
    end
 | 
					    end
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user