blob: 38d1cd0f83d801c387e078c1b127e3c02516925b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
---
# input variables:
# - repoquery_cmd
# - excluder
# - openshift_upgrade_target
- block:
- name: Get available excluder version
command: >
{{ repoquery_cmd }} --qf '%{version}' "{{ excluder }}"
register: excluder_version
failed_when: false
changed_when: false
- name: Docker excluder version detected
debug:
msg: "{{ excluder }}: {{ excluder_version.stdout }}"
- name: Check the available {{ excluder }} version is at most of the upgrade target version
fail:
msg: "Available {{ excluder }} version {{ excluder_version.stdout }} is higher than the upgrade target version {{ openshift_upgrade_target }}"
when:
- "{{ excluder_version.stdout != '' }}"
- "{{ excluder_version.stdout.split('.')[0:2] | join('.') | version_compare(openshift_upgrade_target, '>', strict=True) }}"
when:
- not openshift.common.is_atomic | bool
|