Execution
Date 08 Dec 2025 13:39:52 +0000
Duration 00:35:02.03
Controller aio1.openstack.local
User root
Versions
Ansible 2.18.6
ara 1.7.4 / 1.7.4
Python 3.12.3
Summary
2 Hosts
1377 Tasks
1365 Results
104 Plays
504 Files
0 Records

File: /home/zuul/src/opendev.org/openstack/openstack-ansible-os_horizon/tasks/horizon_apache.yml

---
# Copyright 2014, Rackspace US, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

- name: Clean-up old vhost files
  ansible.builtin.file:
    path: "{{ item }}"
    state: absent
  loop: "{{ horizon_deprecated_apache_configs }}"

- name: Including HTTPD role
  ansible.builtin.import_role:
    name: httpd
  vars:
    httpd_pki_dir: "{{ horizon_pki_dir }}"
    httpd_pki_setup_host: "{{ horizon_pki_setup_host }}"
    httpd_ssl_protocol: "{{ horizon_ssl_protocol }}"
    httpd_ssl_cipher_suite_tls12: "{{ horizon_ssl_cipher_suite_tls12 }}"
    httpd_ssl_cipher_suite_tls13: "{{ horizon_ssl_cipher_suite_tls13 }}"
    httpd_pki_regen_cert: "{{ horizon_pki_regen_cert }}"
    httpd_extra_packages: "{{ horizon_apache_distro_packages }}"
    httpd_extra_modules:
      - name: "wsgi"
        state: "present"
    httpd_vhosts:
      - name: openstack_dashboard
        address: "{{ horizon_bind_address }}"
        port: "{{ (horizon_backend_ssl | bool) | ternary(horizon_listen_ports.https, horizon_listen_ports.http) }}"
        log_level: "{{ horizon_log_level }}"
        log_format: "{{ horizon_apache_custom_log_format }}"
        server_name: "{{ horizon_server_name }}"
        headers:
          - 'RequestHeader set {{ horizon_secure_proxy_ssl_header }} "{{ horizon_external_ssl | ternary("https", "http") }}"'
        options:
          - "WSGIScriptAlias {{ horizon_webroot }} {{ horizon_lib_wsgi_file }}"
          - >-
            WSGIDaemonProcess horizon user={{ horizon_system_user_name }} group={{ horizon_system_group_name }} processes={{ horizon_wsgi_processes | default(
              horizon_wsgi_threads) }} threads={{ horizon_wsgi_threads }} python-path={{ horizon_lib_dir | dirname }}/site-packages
          - "WSGIProcessGroup horizon"
          - "WSGIApplicationGroup %{GLOBAL}"
          - "Alias {{ horizon_webroot }}/static {{ horizon_lib_dir }}/static/"
        directories:
          - path: "{{ horizon_lib_wsgi_file | dirname }}"
            options:
              - "<Files {{ horizon_lib_wsgi_file | basename }} >"
              - "  Require all granted"
              - "</Files>"
          - path: "{{ horizon_lib_dir }}/static/"
            options:
              - Options -FollowSymlinks
              - Require all granted
              - AddOutputFilterByType DEFLATE application/json
              - AddOutputFilterByType DEFLATE text/javascript
              - AddOutputFilterByType DEFLATE text/plain
              - AddOutputFilterByType DEFLATE text/xml
              - AddOutputFilterByType DEFLATE text/html
        ssl: "{{ horizon_backend_ssl | ternary(_horizon_httpd_vhost_ssl, false) }}"
  tags:
    - horizon-install
    - horizon-config
    - httpd