diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2017-10-10 16:59:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 16:59:46 -0700 |
commit | bf4bb23ddfa2d4c9b6d56d09ef8a16e5e9b5b009 (patch) | |
tree | a80963ebea9539d5086bf3125a31fb2f50153ace /roles/openshift_excluder/tasks | |
parent | af04da3ae11cfe5cc80de214a4ec665f1d1676b1 (diff) | |
parent | 7d555333bcb88aa99ea8a1d46ce3f1383519f84f (diff) | |
download | openshift-bf4bb23ddfa2d4c9b6d56d09ef8a16e5e9b5b009.tar.gz openshift-bf4bb23ddfa2d4c9b6d56d09ef8a16e5e9b5b009.tar.bz2 openshift-bf4bb23ddfa2d4c9b6d56d09ef8a16e5e9b5b009.tar.xz openshift-bf4bb23ddfa2d4c9b6d56d09ef8a16e5e9b5b009.zip |
Merge pull request #5129 from maxamillion/fedora-compat
Automatic merge from submit-queue.
Fedora compat fixes for package version checks and dnf bug workaround
Fix a couple things that don't work with Fedora:
- Don't attempt to version check components, they aren't going to match the hard coded RHEL package versions.
- Work around a [bug in dnf](https://bugzilla.redhat.com/show_bug.cgi?id=1199432)'s python API that throws an error when a package spec has a `*` character in the Release field
Once we're done with review, I'll squash commits.
Diffstat (limited to 'roles/openshift_excluder/tasks')
-rw-r--r-- | roles/openshift_excluder/tasks/install.yml | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/roles/openshift_excluder/tasks/install.yml b/roles/openshift_excluder/tasks/install.yml index 3a866cedf..7a5bebf6f 100644 --- a/roles/openshift_excluder/tasks/install.yml +++ b/roles/openshift_excluder/tasks/install.yml @@ -6,19 +6,46 @@ block: - - name: Install docker excluder + - name: Install docker excluder - yum package: name: "{{ r_openshift_excluder_service_type }}-docker-excluder{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) + '*' }}" state: "{{ r_openshift_excluder_docker_package_state }}" when: - r_openshift_excluder_enable_docker_excluder | bool + - ansible_pkg_mgr == "yum" - - name: Install openshift excluder + + # For DNF we do not need the "*" and if we add it, it causes an error because + # it's not a valid pkg_spec + # + # https://bugzilla.redhat.com/show_bug.cgi?id=1199432 + - name: Install docker excluder - dnf + package: + name: "{{ r_openshift_excluder_service_type }}-docker-excluder{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}" + state: "{{ r_openshift_excluder_docker_package_state }}" + when: + - r_openshift_excluder_enable_docker_excluder | bool + - ansible_pkg_mgr == "dnf" + + - name: Install openshift excluder - yum package: name: "{{ r_openshift_excluder_service_type }}-excluder{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) + '*' }}" state: "{{ r_openshift_excluder_package_state }}" when: - r_openshift_excluder_enable_openshift_excluder | bool + - ansible_pkg_mgr == "yum" + + # For DNF we do not need the "*" and if we add it, it causes an error because + # it's not a valid pkg_spec + # + # https://bugzilla.redhat.com/show_bug.cgi?id=1199432 + - name: Install openshift excluder - dnf + package: + name: "{{ r_openshift_excluder_service_type }}-excluder{{ openshift_pkg_version | default('') | oo_image_tag_to_rpm_version(include_dash=True) }}" + state: "{{ r_openshift_excluder_package_state }}" + when: + - r_openshift_excluder_enable_openshift_excluder | bool + - ansible_pkg_mgr == "dnf" - set_fact: r_openshift_excluder_install_ran: True |