Ensure that octavia-amphora-image is installed

We had expected that octavia-amphora-image was always installed when
deploying Octavia (it was pulled by the rhos-director-images RPM) but
when deploying an UEFI overcloud, the package is not installed.

This commits adds a task that ensures the octavia-amphora-image package
is installed if:
- the user doesn't specify another image path
- the RPM is available (the RPM doesn't exist in RDO - tripleo CI jobs
  download the image in an other ansible playbook)

wallaby-backport-potential

Resolves: rhbz#2132889
Change-Id: Ic5fafe54f84fd934839c340b2f7bb5455d8b8639
This commit is contained in:
Gregory Thiemonge 2022-10-12 13:46:02 +02:00
parent 9256ab0a86
commit bcd631f6ad
1 changed files with 14 additions and 0 deletions

View File

@ -21,6 +21,20 @@
- ansible_facts['distribution'] == 'RedHat'
- not (image_filename is defined)
# If the image path was not defined by the user, ensure that the RPM is
# installed.
# Ignore errors if the package doesn't exist (RDO CI).
- name: Ensure amphora image RPM in installed
package:
name: octavia-amphora-image
state: present
ignore_errors: true
vars:
# override the ansible_become variable from the inventory
ansible_become: true
when:
- amp_image_filename is not defined or (amp_image_filename | length) < 1
- name: check if amphora image file exists
stat:
path: "{{ image_filename }}"