Allow to configure horizon bind address
Added variable horizon_bind_address which allows to define address on which horizon will be listening. horizon_listen_ports variable was converted to dict() and used in apache vhost template. As an addition metal jobs were added for horizon CI. Depends-On: https://review.opendev.org/681722 Change-Id: I11c3edec6d58e39da8de5e214fab9731eb5df9e2
This commit is contained in:
parent
a2280e2e90
commit
9f9b66a985
@ -382,9 +382,11 @@ horizon_default_theme: "default"
|
|||||||
|
|
||||||
horizon_webroot: /
|
horizon_webroot: /
|
||||||
|
|
||||||
|
horizon_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}"
|
||||||
|
|
||||||
horizon_listen_ports:
|
horizon_listen_ports:
|
||||||
- "80"
|
http: "80"
|
||||||
- "443"
|
https: "443"
|
||||||
|
|
||||||
horizon_pip_packages:
|
horizon_pip_packages:
|
||||||
- horizon
|
- horizon
|
||||||
|
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
upgrade:
|
||||||
|
- |
|
||||||
|
`horizon_listen_ports` variable was transformed to the dictionary with
|
||||||
|
required keys `http` and `https` to have effect not only for apache
|
||||||
|
ports.conf file, but also for the virtual host.
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
Added variable `horizon_bind_address` which defines IP address where Apache
|
||||||
|
will listen on `horizon_listen_ports`
|
@ -1,5 +1,5 @@
|
|||||||
# {{ ansible_managed }}
|
# {{ ansible_managed }}
|
||||||
|
|
||||||
{% for horizon_listen_port in horizon_listen_ports %}
|
{% for horizon_listen_port in horizon_listen_ports.values() %}
|
||||||
Listen {{ horizon_listen_port }}
|
Listen {{ horizon_bind_address }}:{{ horizon_listen_port }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
# If horizon is being served via SSL from this web server,
|
# If horizon is being served via SSL from this web server,
|
||||||
# then we must redirect HTTP requests to HTTPS.
|
# then we must redirect HTTP requests to HTTPS.
|
||||||
{% if (horizon_enable_ssl | bool) and not (horizon_external_ssl | bool) %}
|
{% if (horizon_enable_ssl | bool) and not (horizon_external_ssl | bool) %}
|
||||||
<VirtualHost *:80>
|
<VirtualHost {{ horizon_bind_address }}:{{ horizon_listen_ports.http }}>
|
||||||
ServerName {{ horizon_server_name }}
|
ServerName {{ horizon_server_name }}
|
||||||
RewriteEngine On
|
RewriteEngine On
|
||||||
RewriteCond %{HTTPS} !=on
|
RewriteCond %{HTTPS} !=on
|
||||||
@ -14,7 +14,7 @@
|
|||||||
# If horizon is being served via SSL via a load balancer, we
|
# If horizon is being served via SSL via a load balancer, we
|
||||||
# need to listen via HTTP on this web server. If SSL is not
|
# need to listen via HTTP on this web server. If SSL is not
|
||||||
# enabled, then the same applies.
|
# enabled, then the same applies.
|
||||||
<VirtualHost *:{{ ((horizon_enable_ssl | bool) and not (horizon_external_ssl | bool)) | ternary('443', '80') }}>
|
<VirtualHost {{ horizon_bind_address }}:{{ ((horizon_enable_ssl | bool) and not (horizon_external_ssl | bool)) | ternary('horizon_listen_ports.https', 'horizon_listen_ports.http') }}>
|
||||||
ServerName {{ horizon_server_name }}
|
ServerName {{ horizon_server_name }}
|
||||||
LogLevel {{ horizon_log_level }}
|
LogLevel {{ horizon_log_level }}
|
||||||
ErrorLog syslog:daemon
|
ErrorLog syslog:daemon
|
||||||
|
@ -49,7 +49,6 @@ horizon_apache_configs:
|
|||||||
|
|
||||||
horizon_apache_default_sites:
|
horizon_apache_default_sites:
|
||||||
- "/etc/apache2/sites-enabled/000-default.conf"
|
- "/etc/apache2/sites-enabled/000-default.conf"
|
||||||
- "/etc/apache2/conf-enabled/openstack-dashboard.conf"
|
|
||||||
- "/etc/apache2/conf-enabled/other-vhosts-access-log.conf"
|
- "/etc/apache2/conf-enabled/other-vhosts-access-log.conf"
|
||||||
|
|
||||||
horizon_apache_modules:
|
horizon_apache_modules:
|
||||||
|
@ -18,6 +18,8 @@
|
|||||||
- check-requirements
|
- check-requirements
|
||||||
- openstack-ansible-deploy-aio_distro_lxc-jobs
|
- openstack-ansible-deploy-aio_distro_lxc-jobs
|
||||||
- openstack-ansible-deploy-aio_lxc-jobs
|
- openstack-ansible-deploy-aio_lxc-jobs
|
||||||
|
- openstack-ansible-deploy-aio_metal-jobs
|
||||||
|
- openstack-ansible-deploy-aio_distro_metal-jobs
|
||||||
- openstack-ansible-linters
|
- openstack-ansible-linters
|
||||||
- publish-openstack-docs-pti
|
- publish-openstack-docs-pti
|
||||||
- release-notes-jobs-python3
|
- release-notes-jobs-python3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user