Skip to content

Commit

Permalink
Merge pull request #159 from robnester-rh/158_Fix_prereqs_Fedora_30
Browse files Browse the repository at this point in the history
ADD conditions to install proper pkgs in Fedora 30
  • Loading branch information
dirgim authored Jun 12, 2019
2 parents 064aa34 + a8a69ce commit 42c86d3
Showing 1 changed file with 35 additions and 3 deletions.
38 changes: 35 additions & 3 deletions playbooks/roles/prereqs/tasks/install_virtual_reqs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@

- name: Install pre-requesites for dnf support for Fedora
- name: Install pre-requesites for dnf support for Fedora 29 and below
raw: dnf install -y --allowerasing python-dnf
when: ansible_distribution == 'Fedora'
when: ansible_distribution == 'Fedora' and ansible_distribution_version|int <= 29
become: true

- name: Install pre-requesites for dnf support for Fedora 30 and above
raw: dnf install -y --allowerasing python3-dnf
when: ansible_distribution == 'Fedora' and ansible_distribution_version|int >= 30
become: true

- name: Check if EPEL is installed for non Fedora distros
Expand Down Expand Up @@ -38,4 +43,31 @@
- jq
- libselinux-python
- git
become: true
become: true
when: not ansible_distribution == 'Fedora'

- name: "Install libvirt, qemu-kvm, and jq on {{ ansible_distribution }} version 29 or below"
package:
name: "{{ item }}"
state: present
with_items:
- libvirt
- qemu-kvm
- jq
- libselinux-python
- git
become: true
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int <= 29

- name: "Install libvirt, qemu-kvm, and jq on {{ ansible_distribution }} version 30 or above"
package:
name: "{{ item }}"
state: present
with_items:
- libvirt
- qemu-kvm
- jq
- python3-libselinux
- git
become: true
when: ansible_distribution == 'Fedora' and ansible_distribution_major_version|int >= 30

0 comments on commit 42c86d3

Please sign in to comment.