diff options
author | Jan Chaloupka <jchaloup@redhat.com> | 2017-03-07 23:39:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-07 23:39:00 +0100 |
commit | d3da4d1817d54b9c3aef9fffa6ad166ec950e830 (patch) | |
tree | 6fe794ca484b0a4807c7af3dc4bdf008d0c8d9bd /playbooks/common/openshift-cluster/upgrades/pre | |
parent | 7c8f77dbf4ea10a5b9034dbd2a6519d8e0d5e8ce (diff) | |
parent | 1a16667b6a2e99ca6dc6b83c5794fb9995501280 (diff) | |
download | openshift-d3da4d1817d54b9c3aef9fffa6ad166ec950e830.tar.gz openshift-d3da4d1817d54b9c3aef9fffa6ad166ec950e830.tar.bz2 openshift-d3da4d1817d54b9c3aef9fffa6ad166ec950e830.tar.xz openshift-d3da4d1817d54b9c3aef9fffa6ad166ec950e830.zip |
Merge pull request #3529 from ingvagabund/upgrade-excluders-in-upgrade-only
WIP: update excluders to latest by default, in non-upgrade scenarios do not update
Diffstat (limited to 'playbooks/common/openshift-cluster/upgrades/pre')
-rw-r--r-- | playbooks/common/openshift-cluster/upgrades/pre/validate_excluder.yml | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/pre/validate_excluder.yml b/playbooks/common/openshift-cluster/upgrades/pre/validate_excluder.yml new file mode 100644 index 000000000..5078638b7 --- /dev/null +++ b/playbooks/common/openshift-cluster/upgrades/pre/validate_excluder.yml @@ -0,0 +1,22 @@ +--- +# input variables: +# - repoquery_cmd +# - excluder +# - openshift_upgrade_target +- 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) }}" |