Do not fail when admin openrc file does not exist

Change-Id: If89bb28fa2e8cc615da21893201cc438d5b6ff05
Story: 2009323
Task: 43745
This commit is contained in:
Will Szumski 2021-10-25 10:02:51 +01:00 committed by Pierre Riteau
parent 4028a56fac
commit 73cb007ab9
2 changed files with 10 additions and 0 deletions

View File

@ -3,8 +3,10 @@
slurp:
src: "{{ kolla_config_path }}/admin-openrc.sh"
register: admin_openrc
when: (kolla_config_path ~ '/admin-openrc.sh') is exists
- name: Ensure a public OpenStack API environment file exists
template:
src: public-openrc.sh.j2
dest: "{{ public_openrc_kolla_config_path }}/public-openrc.sh"
when: admin_openrc is not skipped

View File

@ -0,0 +1,8 @@
---
fixes:
- |
``public-openrc.sh`` is now only generated if the ``admin-openrc.sh`` file
generated by Kolla Ansible exists. This fixes an issue where the task would
fail, when running in a clean environment, with a set of Kolla Ansible tags
that did not include the generation of ``admin-openrc.sh``. See `story
2009323 <https://storyboard.openstack.org/#!/story/2009323>`__.