mirror of
https://github.com/ansible/awx-operator.git
synced 2026-03-26 21:33:14 +00:00
fix: Correct the image_version conditional (#2082)
* fix: Correct the image_version conditional When image is set and image_version is unset, the conditional is failing due to the unset variable causes and error. Implemented the correct conditional and added an assert to validate that both variables are set properly when image is set. Signed-off-by: Lucas Benedito <lbenedit@redhat.com>
This commit is contained in:
@@ -224,7 +224,7 @@
|
||||
_custom_image: "{{ image }}:{{ image_version }}"
|
||||
when:
|
||||
- image | default([]) | length
|
||||
- image_version is defined or image_version != ''
|
||||
- image_version is defined and image_version != ''
|
||||
|
||||
- name: Set AWX app image URL
|
||||
set_fact:
|
||||
@@ -239,7 +239,7 @@
|
||||
_custom_redis_image: "{{ redis_image }}:{{ redis_image_version }}"
|
||||
when:
|
||||
- redis_image | default([]) | length
|
||||
- redis_image_version is defined or redis_image_version != ''
|
||||
- redis_image_version is defined and redis_image_version != ''
|
||||
|
||||
- name: Set Redis image URL
|
||||
set_fact:
|
||||
|
||||
Reference in New Issue
Block a user