Add support to override http/https port
Adds support to override the http and/or https ports that is passed down to the horizon::wsgi::apache class. No default values has been changed. Change-Id: I57fd5f3a433c6e123aa0f531630941fabf6ea721 Closes-Bug: 1210719
This commit is contained in:
parent
b0f6bde9a6
commit
a4cb8367ac
@ -174,6 +174,12 @@
|
|||||||
# [*listen_ssl*]
|
# [*listen_ssl*]
|
||||||
# (optional) Enable SSL support in Apache. (Defaults to false)
|
# (optional) Enable SSL support in Apache. (Defaults to false)
|
||||||
#
|
#
|
||||||
|
# [*http_port*]
|
||||||
|
# (optional) Port to use for the HTTP virtual host. (Defaults to 80)
|
||||||
|
#
|
||||||
|
# [*https_port*]
|
||||||
|
# (optional) Port to use for the HTTPS virtual host. (Defaults to 443)
|
||||||
|
#
|
||||||
# [*ssl_no_verify*]
|
# [*ssl_no_verify*]
|
||||||
# (optionsl) Disable SSL hostname verifying. Set it if you don't have
|
# (optionsl) Disable SSL hostname verifying. Set it if you don't have
|
||||||
# properly configured DNS which will resolve hostnames for SSL endpoints
|
# properly configured DNS which will resolve hostnames for SSL endpoints
|
||||||
@ -471,6 +477,8 @@ class horizon(
|
|||||||
$server_aliases = $::fqdn,
|
$server_aliases = $::fqdn,
|
||||||
$allowed_hosts = $::fqdn,
|
$allowed_hosts = $::fqdn,
|
||||||
$listen_ssl = false,
|
$listen_ssl = false,
|
||||||
|
$http_port = 80,
|
||||||
|
$https_port = 443,
|
||||||
$ssl_no_verify = false,
|
$ssl_no_verify = false,
|
||||||
$ssl_redirect = true,
|
$ssl_redirect = true,
|
||||||
$horizon_cert = undef,
|
$horizon_cert = undef,
|
||||||
@ -659,6 +667,8 @@ settings_local.py and parameter server_aliases for setting ServerAlias directive
|
|||||||
servername => $servername,
|
servername => $servername,
|
||||||
server_aliases => $final_server_aliases,
|
server_aliases => $final_server_aliases,
|
||||||
listen_ssl => $listen_ssl,
|
listen_ssl => $listen_ssl,
|
||||||
|
http_port => $http_port,
|
||||||
|
https_port => $https_port,
|
||||||
ssl_redirect => $ssl_redirect,
|
ssl_redirect => $ssl_redirect,
|
||||||
horizon_cert => $horizon_cert,
|
horizon_cert => $horizon_cert,
|
||||||
horizon_key => $horizon_key,
|
horizon_key => $horizon_key,
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
You can now override the http and https port to horizon by passing integers
|
||||||
|
to the http_port and https_ports parameters. Default values are still the same.
|
@ -273,7 +273,6 @@ describe 'horizon' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
context 'with ssl enabled' do
|
context 'with ssl enabled' do
|
||||||
before do
|
before do
|
||||||
params.merge!({
|
params.merge!({
|
||||||
@ -296,6 +295,22 @@ describe 'horizon' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
context 'with overriden http and https ports' do
|
||||||
|
before do
|
||||||
|
params.merge!({
|
||||||
|
:http_port => 1028,
|
||||||
|
:https_port => 1029,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
|
||||||
|
it 'configures apache' do
|
||||||
|
is_expected.to contain_class('horizon::wsgi::apache').with({
|
||||||
|
:http_port => 1028,
|
||||||
|
:https_port => 1029,
|
||||||
|
})
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
context 'with default root_path' do
|
context 'with default root_path' do
|
||||||
it 'configures apache' do
|
it 'configures apache' do
|
||||||
is_expected.to contain_class('horizon::wsgi::apache').with({
|
is_expected.to contain_class('horizon::wsgi::apache').with({
|
||||||
|
Loading…
Reference in New Issue
Block a user