diff options
author | Jan Chaloupka <jchaloup@redhat.com> | 2017-05-02 13:21:51 +0200 |
---|---|---|
committer | Jan Chaloupka <jchaloup@redhat.com> | 2017-05-11 13:42:20 +0200 |
commit | 13b58846f6c595c9530fe49e3a00ed6f3f42a896 (patch) | |
tree | f04f15529aaab4fa22a15a9096842fd4835bcca5 /roles/openshift_excluder/tasks | |
parent | 87c282b612ee53441e7564f53ac49a1a6624d820 (diff) | |
download | openshift-13b58846f6c595c9530fe49e3a00ed6f3f42a896.tar.gz openshift-13b58846f6c595c9530fe49e3a00ed6f3f42a896.tar.bz2 openshift-13b58846f6c595c9530fe49e3a00ed6f3f42a896.tar.xz openshift-13b58846f6c595c9530fe49e3a00ed6f3f42a896.zip |
Extend repoquery command (of lib_utils role) to ignore excluders
Diffstat (limited to 'roles/openshift_excluder/tasks')
-rw-r--r-- | roles/openshift_excluder/tasks/verify_excluder.yml | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/roles/openshift_excluder/tasks/verify_excluder.yml b/roles/openshift_excluder/tasks/verify_excluder.yml index 24a05d56e..aebdb8c58 100644 --- a/roles/openshift_excluder/tasks/verify_excluder.yml +++ b/roles/openshift_excluder/tasks/verify_excluder.yml @@ -5,15 +5,21 @@ # - openshift_upgrade_target - block: - name: Get available excluder version - command: > - {{ repoquery_cmd }} --qf '%{version}' "{{ excluder }}" - register: excluder_version - failed_when: false - changed_when: false + repoquery: + name: "{{ excluder }}" + ignore_excluders: true + register: excluder_out + + - fail: + msg: "Package {{ excluder }} not found" + when: not excluder_out.results.package_found + + - set_fact: + excluder_version: "{{ excluder_out.results.versions.available_versions.0 }}" - name: "{{ excluder }} version detected" debug: - msg: "{{ excluder }}: {{ excluder_version.stdout }}" + msg: "{{ excluder }}: {{ excluder_version }}" - name: Printing upgrade target version debug: @@ -21,9 +27,9 @@ - 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" + msg: "Available {{ excluder }} version {{ excluder_version }} is higher than the upgrade target version" when: - - "{{ excluder_version.stdout != '' }}" - - "{{ excluder_version.stdout.split('.')[0:2] | join('.') | version_compare(openshift_upgrade_target.split('.')[0:2] | join('.'), '>', strict=True) }}" + - "{{ excluder_version != '' }}" + - "{{ excluder_version.split('.')[0:2] | join('.') | version_compare(openshift_upgrade_target.split('.')[0:2] | join('.'), '>', strict=True) }}" when: - not openshift.common.is_atomic | bool |