summaryrefslogtreecommitdiffstats
path: root/playbooks
diff options
context:
space:
mode:
authorJan Chaloupka <jchaloup@redhat.com>2017-06-10 12:57:31 +0200
committerGitHub <noreply@github.com>2017-06-10 12:57:31 +0200
commit705d18190fe463c9f609f95882f16b95d3f7cca2 (patch)
treee158ed8654030a4ded9259320b16ba21d9cc09a5 /playbooks
parentedbede8e09f00b49eeaabeb26f3e6aebbb9de9f8 (diff)
parent2c66bed10e48455280572e9c488399691c5e8b06 (diff)
downloadopenshift-705d18190fe463c9f609f95882f16b95d3f7cca2.tar.gz
openshift-705d18190fe463c9f609f95882f16b95d3f7cca2.tar.bz2
openshift-705d18190fe463c9f609f95882f16b95d3f7cca2.tar.xz
openshift-705d18190fe463c9f609f95882f16b95d3f7cca2.zip
Merge pull request #4400 from ingvagabund/replace-repoquery-with-module
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: