summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-06-09 14:20:54 +0200
committerJan Chaloupka <jchaloup@redhat.com>2017-06-09 15:14:04 +0200
commit2c66bed10e48455280572e9c488399691c5e8b06 (patch)
treef78de1c28932361b3018bb8331e01bf1d70b9212 /playbooks
parente651d65dc1e3f53c0ad2e587d7392a31e827c905 (diff)
downloadopenshift-2c66bed10e48455280572e9c488399691c5e8b06.tar.gz
openshift-2c66bed10e48455280572e9c488399691c5e8b06.tar.bz2
openshift-2c66bed10e48455280572e9c488399691c5e8b06.tar.xz
openshift-2c66bed10e48455280572e9c488399691c5e8b06.zip
Replace repoquery with module
Diffstat (limited to 'playbooks')
-rw-r--r--playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml20
1 files changed, 11 insertions, 9 deletions
diff --git a/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml b/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
index 1b437dce9..9b4a8e413 100644
--- a/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
+++ b/playbooks/common/openshift-cluster/upgrades/pre/verify_upgrade_targets.yml
@@ -14,24 +14,26 @@
- when: not openshift.common.is_containerized | bool
block:
- name: Check latest available OpenShift RPM version
- command: >
- {{ repoquery_cmd }} --qf '%{version}' "{{ openshift.common.service_type }}"
- failed_when: false
- changed_when: false
- register: avail_openshift_version
+ repoquery:
+ name: "{{ openshift.common.service_type }}"
+ ignore_excluders: true
+ register: repoquery_out
- name: Fail when unable to determine available OpenShift RPM version
fail:
msg: "Unable to determine available OpenShift RPM version"
when:
- - avail_openshift_version.stdout == ''
+ - not repoquery_out.results.package_found
+
+ - name: Set fact avail_openshift_version
+ set_fact:
+ avail_openshift_version: "{{ repoquery_out.results.versions.available_versions.0 }}"
- name: Verify OpenShift RPMs are available for upgrade
fail:
- msg: "OpenShift {{ avail_openshift_version.stdout }} is available, but {{ openshift_upgrade_target }} or greater is required"
+ msg: "OpenShift {{ avail_openshift_version }} is available, but {{ openshift_upgrade_target }} or greater is required"
when:
- - not avail_openshift_version | skipped
- - avail_openshift_version.stdout | default('0.0', True) | version_compare(openshift_release, '<')
+ - avail_openshift_version | default('0.0', True) | version_compare(openshift_release, '<')
- name: Fail when openshift version does not meet minium requirement for Origin upgrade
fail: