Skip to content

Commit

Permalink
Fix for order of conditions for jmx_exporter upgrade (#2846)
Browse files Browse the repository at this point in the history
[BUG] Incorrect order of multiple conditions check in jmx_exporter upgrade task #2845

Signed-off-by: cicharka <[email protected]>
  • Loading branch information
cicharka authored Jan 5, 2022
1 parent 9f37e20 commit 464c368
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions ansible/playbooks/roles/jmx_exporter/tasks/upgrade/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,7 @@
msg: "Skipping upgrade: JMX Exporter in the same or newer version already installed!"

- name: Upgrade | jmx-exporter
when: >
jmx_exporter_version.old is version( jmx_exporter_version.new, '<' ) or
lock_file_status.stat.exists
when: lock_file_status.stat.exists or jmx_exporter_version.old is version( jmx_exporter_version.new, '<' )
block:
- name: Create upgrade flag file
file:
Expand Down

0 comments on commit 464c368

Please sign in to comment.