Skip to content

Commit

Permalink
rocky - add to multiple if base_distro statements
Browse files Browse the repository at this point in the history
Change-Id: Ib068117237a199db380fcdfb757d5d0e5d34326b
(cherry picked from commit 9d5f908)
  • Loading branch information
mnasiadka committed Feb 9, 2023
1 parent 416c8ab commit 87899a2
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 12 deletions.
2 changes: 1 addition & 1 deletion ansible/roles/cinder/templates/cinder-wsgi.conf.j2
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% if cinder_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/heat/templates/wsgi-heat-api-cfn.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set heat_log_dir = '/var/log/kolla/heat' %}
{% set binary_path = '/usr/bin' if heat_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
{% if heat_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/heat/templates/wsgi-heat-api.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set heat_log_dir = '/var/log/kolla/heat' %}
{% set binary_path = '/usr/bin' if heat_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
{% if heat_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/horizon/templates/horizon.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set python_path = '/usr/share/openstack-dashboard' if horizon_install_type == 'binary' else '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %}

{% if horizon_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/ironic/templates/ironic-api-wsgi.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set ironic_log_dir = '/var/log/kolla/ironic' %}
{% set wsgi_directory = '/usr/bin' if ironic_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
{% if ironic_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
11 changes: 10 additions & 1 deletion ansible/roles/ironic/templates/ironic-tftp.json.j2
Original file line number Diff line number Diff line change
@@ -1,4 +1,13 @@
{% set pxe_dir = ('/var/lib/ironic/tftpboot/grub' if kolla_base_distro in ['ubuntu', 'debian'] else '/var/lib/ironic/tftpboot/EFI/centos') if enable_ironic_pxe_uefi | bool else '/var/lib/ironic/tftpboot/pxelinux.cfg' %}
{% if enable_ironic_pxe_uefi | bool %}
{% if kolla_base_distro in ['debian', 'ubuntu'] %}
{% set pxe_dir = '/var/lib/ironic/tftpboot/grub' %}
{% elif kolla_base_distro in ['centos', 'rocky'] %}
{% set pxe_dir = '/var/lib/ironic/tftpboot/EFI/{{ kolla_base_distro }}' %}
{% endif %}
{% else %}
{% set pxe_dir = '/var/lib/ironic/tftpboot/pxelinux.cfg' %}
{% endif %}

{% set pxe_cfg = 'grub.cfg' if enable_ironic_pxe_uefi | bool else 'default' %}

{
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/keystone/templates/wsgi-keystone.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set keystone_log_dir = '/var/log/kolla/keystone' %}
{% set binary_path = '/usr/bin' if keystone_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
{% if keystone_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/nova/templates/nova-api-wsgi.conf.j2
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set nova_log_dir = '/var/log/kolla/nova' %}
{% set wsgi_directory = '/usr/bin' if nova_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
{% if nova_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/octavia/templates/octavia-wsgi.conf.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% set wsgi_directory = '/usr/bin' if octavia_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
{% if octavia_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% set log_dir = '/var/log/kolla/placement' %}
{% set wsgi_directory = '/usr/bin' if placement_install_type == 'binary' else '/var/lib/kolla/venv/bin' %}
{% if placement_enable_tls_backend | bool %}
{% if kolla_base_distro in ['centos'] %}
{% if kolla_base_distro in ['centos', 'rocky'] %}
LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so
{% else %}
LoadModule ssl_module /usr/lib/apache2/modules/mod_ssl.so
Expand Down
4 changes: 2 additions & 2 deletions tests/templates/globals-default.j2
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ kolla_enable_tls_external: "yes"
kolla_enable_tls_internal: "yes"
kolla_copy_ca_into_containers: "yes"
kolla_enable_tls_backend: "yes"
{% if base_distro == "ubuntu" or base_distro == "debian" %}
{% if base_distro in ["debian", "ubuntu"] %}
openstack_cacert: "/etc/ssl/certs/ca-certificates.crt"
{% endif %}
{% if base_distro == "centos" %}
{% if base_distro in ["centos", "rocky"] %}
openstack_cacert: "/etc/pki/tls/certs/ca-bundle.crt"
{% endif %}
kolla_admin_openrc_cacert: "{% raw %}{{ kolla_certificates_dir }}{% endraw %}/ca/root.crt"
Expand Down

0 comments on commit 87899a2

Please sign in to comment.