Skip to content
This repository has been archived by the owner on Feb 9, 2022. It is now read-only.

Commit

Permalink
Fix installation of rhvm package in upgrade
Browse files Browse the repository at this point in the history
Once there is installed rhevm package from 4.1 version, during the
upgrade we cannot install package rhvm cause it's missing in the list
probably because of yum versionlock plugin.

So we can check if it's installed, and if not we can process with
installation otherwise we can skip the installation.
  • Loading branch information
petr-balogh authored and machacekondra committed Dec 5, 2018
1 parent 252c21d commit 309db54
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tasks/install_packages.yml
Expand Up @@ -5,11 +5,17 @@
state: present
when: ovirt_engine_setup_product_type | lower == 'ovirt'

- name: Check if rhevm package is installed
yum:
list: "rhevm"
when: ovirt_engine_setup_product_type | lower == 'rhv' and ansible_os_family == 'RedHat'
register: rhevm_installed

- name: Install RHV package
package:
name: "{{ 'rhevm' if ovirt_engine_setup_version is version('4.2', '<') else 'rhvm' }}"
state: present
when: ovirt_engine_setup_product_type | lower == 'rhv'
when: ovirt_engine_setup_product_type | lower == 'rhv' and rhevm_installed.results | default([]) | selectattr('yumstate', 'match', 'installed') | list | length == 0

- name: Install rest of the packages required for oVirt Engine deployment
package:
Expand Down

0 comments on commit 309db54

Please sign in to comment.