Skip to content

Commit

Permalink
Add quotes to default version
Browse files Browse the repository at this point in the history
Co-authored-by: Dimitri Savineau <savineau.dimitri@gmail.com>
  • Loading branch information
rooftopcellist and dsavineau authored Oct 16, 2024
1 parent d9c1449 commit 8a93e13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions roles/installer/tasks/check_previous_version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@

- name: Set previous_version version based on AWX CR version status
ansible.builtin.set_fact:
previous_version: "{{ existing_deployment.resources[0].status.version | default(0.0.0) }}"
previous_version: "{{ existing_deployment.resources[0].status.version | default('0.0.0') }}"
when: existing_deployment['resources'] | length > 0

- name: If previous_version is less than or equal to gating_version, set upgraded_from to previous_version
ansible.builtin.set_fact:
upgraded_from: "{{ previous_version }}"
when: previous_version | version_compare(gating_version, '<')
when: previous_version is version_compare(gating_version, '<')
3 changes: 2 additions & 1 deletion roles/installer/tasks/update_status.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
name: "{{ ansible_operator_meta.name }}"
namespace: "{{ ansible_operator_meta.namespace }}"
status:
upgradedFrom: "{{ upgraded_from | default(omit) }}"
upgradedFrom: "{{ upgraded_from }}"
when: upgraded_from is defined

- name: Update version status
operator_sdk.util.k8s_status:
Expand Down

0 comments on commit 8a93e13

Please sign in to comment.