diff --git a/ansible/roles/public-openrc/templates/public-openrc.sh.j2 b/ansible/roles/public-openrc/templates/public-openrc.sh.j2 index 1c2dd179c..d11c795dd 100644 --- a/ansible/roles/public-openrc/templates/public-openrc.sh.j2 +++ b/ansible/roles/public-openrc/templates/public-openrc.sh.j2 @@ -11,9 +11,10 @@ export OS_ENDPOINT_TYPE=publicURL 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 %} +{% if kolla_public_openrc_cacert is not none %} +export OS_CACERT={{ kolla_public_openrc_cacert }} +{% endif %} diff --git a/releasenotes/notes/bug-2110549-28e47a915331af95.yaml b/releasenotes/notes/bug-2110549-28e47a915331af95.yaml new file mode 100644 index 000000000..99d5110a6 --- /dev/null +++ b/releasenotes/notes/bug-2110549-28e47a915331af95.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes ``public-openrc.sh`` missing the ``OS_CACERT`` variable when absent + from ``admin-openrc.sh``. + `LP#2110549 `__