diff --git a/defaults/main.yml b/defaults/main.yml index a1a6e173..15370540 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -382,9 +382,11 @@ horizon_default_theme: "default" horizon_webroot: / +horizon_bind_address: "{{ openstack_service_bind_address | default('0.0.0.0') }}" + horizon_listen_ports: - - "80" - - "443" + http: "80" + https: "443" horizon_pip_packages: - horizon diff --git a/releasenotes/notes/horizon_haproxy_conflict-27955d6b7c1a6d30.yaml b/releasenotes/notes/horizon_haproxy_conflict-27955d6b7c1a6d30.yaml new file mode 100644 index 00000000..3c6b003f --- /dev/null +++ b/releasenotes/notes/horizon_haproxy_conflict-27955d6b7c1a6d30.yaml @@ -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` \ No newline at end of file diff --git a/templates/horizon_apache_ports.conf.j2 b/templates/horizon_apache_ports.conf.j2 index 442d248c..a022348e 100644 --- a/templates/horizon_apache_ports.conf.j2 +++ b/templates/horizon_apache_ports.conf.j2 @@ -1,5 +1,5 @@ # {{ ansible_managed }} -{% for horizon_listen_port in horizon_listen_ports %} -Listen {{ horizon_listen_port }} +{% for horizon_listen_port in horizon_listen_ports.values() %} +Listen {{ horizon_bind_address }}:{{ horizon_listen_port }} {% endfor %} diff --git a/templates/openstack_dashboard.conf.j2 b/templates/openstack_dashboard.conf.j2 index 89eade18..e59b5d88 100644 --- a/templates/openstack_dashboard.conf.j2 +++ b/templates/openstack_dashboard.conf.j2 @@ -3,7 +3,7 @@ # If horizon is being served via SSL from this web server, # then we must redirect HTTP requests to HTTPS. {% if (horizon_enable_ssl | bool) and not (horizon_external_ssl | bool) %} - + ServerName {{ horizon_server_name }} RewriteEngine On RewriteCond %{HTTPS} !=on @@ -14,7 +14,7 @@ # 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 # enabled, then the same applies. - + ServerName {{ horizon_server_name }} LogLevel {{ horizon_log_level }} ErrorLog syslog:daemon diff --git a/vars/debian.yml b/vars/debian.yml index 7b9ff0ce..0da35ae3 100644 --- a/vars/debian.yml +++ b/vars/debian.yml @@ -49,7 +49,6 @@ horizon_apache_configs: horizon_apache_default_sites: - "/etc/apache2/sites-enabled/000-default.conf" - - "/etc/apache2/conf-enabled/openstack-dashboard.conf" - "/etc/apache2/conf-enabled/other-vhosts-access-log.conf" horizon_apache_modules: diff --git a/zuul.d/project.yaml b/zuul.d/project.yaml index d4bf3372..8e31e35c 100644 --- a/zuul.d/project.yaml +++ b/zuul.d/project.yaml @@ -18,6 +18,8 @@ - check-requirements - openstack-ansible-deploy-aio_distro_lxc-jobs - openstack-ansible-deploy-aio_lxc-jobs + - openstack-ansible-deploy-aio_metal-jobs + - openstack-ansible-deploy-aio_distro_metal-jobs - openstack-ansible-linters - publish-openstack-docs-pti - release-notes-jobs-python3