Do not copy TLS files for backend if turned off

This patch fixes an issue where backend related
certificates are attempted to be copied when
``kolla_copy_ca_into_containers`` is enabled but
``kolla_enable_tls_backend`` is disabled.

The fix consists of these specific tasks now
being limited by the condition ``kolla_enable_tls_backend``

Closes-Bug: #2080381

Change-Id: I7ccae4c501ce332519edef336bcceefae9f9568b
This commit is contained in:
Michal Arbet 2024-09-11 16:42:25 +02:00
parent f35cf5572c
commit 1540618f00
2 changed files with 11 additions and 0 deletions

View File

@ -24,6 +24,8 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ project_name }}-cert.pem"
mode: "0644"
become: true
when:
- kolla_enable_tls_backend | bool
with_dict: "{{ project_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"
@ -41,6 +43,8 @@
dest: "{{ node_config_directory }}/{{ item.key }}/{{ project_name }}-key.pem"
mode: "0600"
become: true
when:
- kolla_enable_tls_backend | bool
with_dict: "{{ project_services | select_services_enabled_and_mapped_to_host }}"
notify:
- "Restart {{ item.key }} container"

View File

@ -0,0 +1,7 @@
---
fixes:
- |
Fixes an issue where backend-related certificates are
attempted to be copied when ``kolla_copy_ca_into_containers``
is enabled but ``kolla_enable_tls_backend`` is disabled.
`LP#2080381 <https://bugs.launchpad.net/kolla-ansible/+bug/2080381>`__