diff --git a/ansible/group_vars/all.yml b/ansible/group_vars/all.yml index 6f85ab5a35..7b124a214f 100644 --- a/ansible/group_vars/all.yml +++ b/ansible/group_vars/all.yml @@ -249,6 +249,7 @@ heat_api_cfn_port: "8000" heat_api_cfn_listen_port: "{{ heat_api_cfn_port }}" horizon_port: "80" +horizon_listen_port: "{{ horizon_port }}" influxdb_admin_port: "8083" influxdb_http_port: "8086" diff --git a/ansible/roles/horizon/defaults/main.yml b/ansible/roles/horizon/defaults/main.yml index b8f7b1d146..4577eb8e99 100644 --- a/ansible/roles/horizon/defaults/main.yml +++ b/ansible/roles/horizon/defaults/main.yml @@ -49,6 +49,7 @@ horizon_services: mode: "http" external: false port: "{{ horizon_port }}" + listen_port: "{{ horizon_listen_port }}" frontend_http_extra: - "balance source" horizon_external: @@ -56,6 +57,7 @@ horizon_services: mode: "http" external: true port: "{% if kolla_enable_tls_external|bool %}443{% else %}{{ horizon_port }}{% endif %}" + listen_port: "{{ horizon_listen_port }}" frontend_http_extra: - "balance source" horizon_external_redirect: @@ -63,6 +65,7 @@ horizon_services: mode: "redirect" external: true port: "{{ horizon_port }}" + listen_port: "{{ horizon_listen_port }}" horizon_keystone_domain_choices: Default: default diff --git a/ansible/roles/horizon/tasks/precheck.yml b/ansible/roles/horizon/tasks/precheck.yml index 43855f8886..740e61602f 100644 --- a/ansible/roles/horizon/tasks/precheck.yml +++ b/ansible/roles/horizon/tasks/precheck.yml @@ -10,7 +10,7 @@ horizon: "{{ horizon_services['horizon'] }}" wait_for: host: "{{ api_interface_address }}" - port: "{{ horizon_port }}" + port: "{{ horizon_listen_port }}" connect_timeout: 1 timeout: 1 state: stopped diff --git a/ansible/roles/horizon/templates/horizon.conf.j2 b/ansible/roles/horizon/templates/horizon.conf.j2 index aa14da3862..5b442f843b 100644 --- a/ansible/roles/horizon/templates/horizon.conf.j2 +++ b/ansible/roles/horizon/templates/horizon.conf.j2 @@ -1,11 +1,11 @@ {% set python_path = '/usr/share/openstack-dashboard' if horizon_install_type == 'binary' else '/var/lib/kolla/venv/lib/python2.7/site-packages' %} -Listen {{ api_interface_address }}:{{ horizon_port }} +Listen {{ api_interface_address }}:{{ horizon_listen_port }} ServerSignature Off ServerTokens Prod TraceEnable off - + LogLevel warn ErrorLog /var/log/kolla/horizon/horizon.log LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat