Add dependency for enable KSM for RHEL/CentOS8

With the OS change to version 8, the qemu-kvm-common package
name changed to just qemu-kvm-common instead of qemu-kvm-common-ev
or qemu-kvm-common-rhev. This adds a condition for the major
OS version.

Change-Id: Idd69c687232a10fcb6db79a8b835a1576b7558dd
Closes-Bug: #1862921
This commit is contained in:
Martin Schuppert 2020-02-12 11:15:10 +01:00
parent 0599bc2f12
commit cfb00c9cfe
1 changed files with 14 additions and 4 deletions

View File

@ -1017,16 +1017,26 @@ outputs:
# mschuppert: we can remove the CentOS/RHEL split here when CentOS8/
# RHEL8 is available and we have the same package name providing the
# KSM services
- name: make sure package providing ksmtuned is installed (CentOS)
- name: make sure package providing ksmtuned is installed (CentOS7)
package:
name: qemu-kvm-common-ev
state: present
when: ansible_distribution == 'CentOS'
- name: make sure package providing ksmtuned is installed (RHEL)
when:
- ansible_distribution == 'CentOS'
- ansible_distribution_major_version == '7'
- name: make sure package providing ksmtuned is installed (RHEL7)
package:
name: qemu-kvm-common-rhev
state: present
when: ansible_distribution == 'RedHat'
when:
- ansible_distribution == 'RedHat'
- ansible_distribution_major_version == '7'
- name: make sure package providing ksmtuned is installed (RHEL8 or CentOS8)
package:
name: qemu-kvm-common
state: present
when:
- ansible_distribution_major_version == '8'
- name: enable ksmtunded
service:
name: "{{ item }}"