Mark Goddard 95729405a3 Fix setting kolla_admin_openrc_cacert
Kolla Ansible renamed kolla_internal_fqdn_cacert to
kolla_admin_openrc_cacert in Victoria, after which we no longer set the
variable correctly in globals.yml. This would lead to a missing
OS_CACERT in admin-openrc.sh and public-openrc.sh.

This change fixes the issue by renaming the relevant Kayobe variables to
match and passing through the correct variable. Backwards compatibility
is provided until the end of the deprecation period.

kolla_public_openrc_cacert -> kolla_external_fqdn_cacert
kolla_admin_openrc_cacert -> kolla_internal_fqdn_cacert

Story: 2010486
Task: 47054

Change-Id: I9e1cc20579cf80525d6ef732a1aac99a65bc171b
Co-Authored-By: Maksim Malchuk <maksim.malchuk@gmail.com>
2023-11-01 10:55:19 +00:00

20 lines
690 B
Django/Jinja

# {{ ansible_managed }}
{% for line in (admin_openrc.content | b64decode).splitlines() %}
{% if "export OS_AUTH_URL" in line %}
export OS_AUTH_URL={{ public_openrc_auth_url }}
{% elif "export OS_INTERFACE" in line %}
export OS_INTERFACE=public
{% elif "export OS_ENDPOINT_TYPE" in line %}
export OS_ENDPOINT_TYPE=publicURL
{% elif "export OS_MANILA_ENDPOINT_TYPE" in line %}
export OS_MANILA_ENDPOINT_TYPE=publicURL
{% elif "export OS_MISTRAL_ENDPOINT_TYPE" in line %}
export OS_MISTRAL_ENDPOINT_TYPE=publicURL
{% elif "export OS_CACERT" in line and kolla_public_openrc_cacert is not none %}
export OS_CACERT={{ kolla_public_openrc_cacert }}
{% else %}
{{ line }}
{% endif %}
{% endfor %}