diff options
| author | Zuul <zuul@review.opendev.org> | 2025-11-27 12:12:33 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2025-11-27 12:12:33 +0000 |
| commit | 3bd221a98819d271f3629b6a95f16da89b1ba303 (patch) | |
| tree | de8c7f12fdd66a837800f4d0098d4bef3cdac314 | |
| parent | 0c6b427999b721a8821cf684d95c6ef5a5a141fd (diff) | |
| parent | 23514cef8592c0a011fb2f27de2a10be9656556e (diff) | |
| download | kolla-ansible-3bd221a98819d271f3629b6a95f16da89b1ba303.tar.gz kolla-ansible-3bd221a98819d271f3629b6a95f16da89b1ba303.zip | |
Merge "Remove distro_python_version variable"
6 files changed, 11 insertions, 12 deletions
diff --git a/ansible/group_vars/all/common.yml b/ansible/group_vars/all/common.yml index 2e0311117..9846af85c 100644 --- a/ansible/group_vars/all/common.yml +++ b/ansible/group_vars/all/common.yml @@ -213,8 +213,6 @@ kolla_base_distro_version_default_map: { "ubuntu": "noble", } -distro_python_version: "3" - kolla_base_distro_version: "{{ kolla_base_distro_version_default_map[kolla_base_distro] }}" #################### diff --git a/ansible/roles/horizon/templates/horizon.conf.j2 b/ansible/roles/horizon/templates/horizon.conf.j2 index e5f851aeb..2f6380da2 100644 --- a/ansible/roles/horizon/templates/horizon.conf.j2 +++ b/ansible/roles/horizon/templates/horizon.conf.j2 @@ -1,5 +1,3 @@ -{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %} - {% if horizon_enable_tls_backend | bool %} {% if kolla_base_distro in ['centos', 'rocky'] %} LoadModule ssl_module /usr/lib64/httpd/modules/mod_ssl.so @@ -23,7 +21,7 @@ TraceEnable off WSGIScriptReloading On WSGIDaemonProcess horizon-http processes={{ horizon_wsgi_processes }} threads={{ horizon_wsgi_threads }} user=horizon group=horizon display-name=horizon WSGIProcessGroup horizon-http - WSGIScriptAlias / {{ python_path }}/openstack_dashboard/wsgi.py + WSGIScriptAlias / /var/lib/kolla/venv/lib/python3/site-packages/openstack_dashboard/wsgi.py WSGIPassAuthorization On WSGIApplicationGroup %{GLOBAL} @@ -35,7 +33,7 @@ TraceEnable off Require local </Location> - Alias /static {{ python_path }}/static + Alias /static /var/lib/kolla/venv/lib/python3/site-packages/static <Location "/static"> SetHandler None </Location> diff --git a/ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j2 b/ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j2 index ace7fd9a1..319bf2f88 100644 --- a/ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j2 +++ b/ansible/roles/ironic/templates/ironic-prometheus-exporter-wsgi.conf.j2 @@ -1,12 +1,11 @@ {% set ironic_log_dir = '/var/log/kolla/ironic' %} -{% set python_path = '/var/lib/kolla/venv/lib/python' + distro_python_version + '/site-packages' %} Listen {{ api_interface_address | put_address_in_context('url') }}:{{ ironic_prometheus_exporter_port }} ServerSignature Off ServerTokens Prod TraceEnable off -<Directory "{{ python_path }}/ironic_prometheus_exporter/app"> +<Directory "/var/lib/kolla/venv/lib/python3/site-packages/ironic_prometheus_exporter/app"> <FilesMatch "^wsgi$"> AllowOverride None Options None @@ -28,9 +27,9 @@ LogLevel info LogFormat "%{X-Forwarded-For}i %l %u %t \"%r\" %>s %b %D \"%{Referer}i\" \"%{User-Agent}i\"" logformat CustomLog "{{ ironic_log_dir }}/ironic-prometheus-exporter-wsgi-access.log" logformat - WSGIDaemonProcess ironic-prometheus-exporter processes={{ openstack_service_workers }} threads=1 user=ironic display-name=%{GROUP} python-path={{ python_path }} + WSGIDaemonProcess ironic-prometheus-exporter processes={{ openstack_service_workers }} threads=1 user=ironic display-name=%{GROUP} python-path=/var/lib/kolla/venv/lib/python3/site-packages WSGIProcessGroup ironic-prometheus-exporter - WSGIScriptAlias / {{ python_path }}/ironic_prometheus_exporter/app/wsgi.py + WSGIScriptAlias / /var/lib/kolla/venv/lib/python3/site-packages/ironic_prometheus_exporter/app/wsgi.py WSGIApplicationGroup %{GLOBAL} <Location "/"> Require all granted diff --git a/ansible/roles/skyline/templates/nginx.conf.j2 b/ansible/roles/skyline/templates/nginx.conf.j2 index 944480464..711c7fbe6 100644 --- a/ansible/roles/skyline/templates/nginx.conf.j2 +++ b/ansible/roles/skyline/templates/nginx.conf.j2 @@ -68,7 +68,7 @@ http { server { listen {{ api_interface_address | put_address_in_context('url') }}:{{ skyline_console_listen_port }}{% if skyline_ssl_certfile and skyline_ssl_keyfile %} ssl http2{% endif %} default_server; - root /var/lib/kolla/venv/lib/python{{ distro_python_version }}/site-packages/skyline_console/static; + root /var/lib/kolla/venv/lib/python3/site-packages/skyline_console/static; # Add index.php to the list if you are using PHP index index.html; diff --git a/ansible/roles/skyline/templates/skyline-console.json.j2 b/ansible/roles/skyline/templates/skyline-console.json.j2 index 6d9e0a082..3cab04905 100644 --- a/ansible/roles/skyline/templates/skyline-console.json.j2 +++ b/ansible/roles/skyline/templates/skyline-console.json.j2 @@ -15,7 +15,7 @@ }{% if skyline_custom_logos | length > 0 %}, { "source": "{{ container_config_directory}}/logos", - "dest": "/var/lib/kolla/venv/lib/python{{ distro_python_version }}/site-packages/skyline_console/static", + "dest": "/var/lib/kolla/venv/lib/python3/site-packages/skyline_console/static", "owner": "root", "perm": "0644", "merge": true diff --git a/releasenotes/notes/remove-distro-python-version-09adac8895cb87d1.yaml b/releasenotes/notes/remove-distro-python-version-09adac8895cb87d1.yaml new file mode 100644 index 000000000..6f19718c3 --- /dev/null +++ b/releasenotes/notes/remove-distro-python-version-09adac8895cb87d1.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + The global variable ``distro_python_version`` has been removed |
