Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update VirtualBox role for RHEL 8 #8

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions roles/virtualbox/molecule/vagrant-rhel-8/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ lint:
platforms:
- name: virtualbox-rhel-8
box: cmihai/rhel-8-base
memory: 768
provisioner:
name: ansible
log: True
Expand Down
4 changes: 3 additions & 1 deletion roles/virtualbox/tasks/configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

- name: rebuild kernel modules
command: /usr/lib/virtualbox/vboxdrv.sh setup
when: "'is loaded' not in vboxdrv_status.stdout"
when:
- "'is loaded' not in vboxdrv_status.stdout"
- "'are loaded' not in vboxdrv_status.stdout"
become: yes

- name: setup VirtualBox user
Expand Down
17 changes: 2 additions & 15 deletions roles/virtualbox/tasks/install_RedHat.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# Install VirtualBox on RedHat

- name: setup VirtualBox yum repository on RHEL <= 7
- name: setup VirtualBox yum repository on RHEL <= 8
yum_repository:
name: virtualbox
description: Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
Expand All @@ -10,20 +10,7 @@
gpgcheck: 1
repo_gpgcheck: 1
gpgkey: https://www.virtualbox.org/download/oracle_vbox.asc
when: ansible_facts['distribution'] == "RedHat" and ansible_facts['distribution_major_version']|int <= 7
become: yes

# Temporary fix, for RHEL 8 (currently, distribution is not available)
- name: setup VirtualBox yum repository on RHEL 8 (using Fedora 29 repo)
yum_repository:
name: virtualbox
description: Fedora $releasever - $basearch - VirtualBox
baseurl: http://download.virtualbox.org/virtualbox/rpm/fedora/29/$basearch
enabled: 1
gpgcheck: 1
repo_gpgcheck: 1
gpgkey: https://www.virtualbox.org/download/oracle_vbox.asc
when: ansible_facts['distribution'] == "RedHat" and ansible_facts['distribution_major_version']|int == 8
when: ansible_facts['distribution'] == "RedHat" and ansible_facts['distribution_major_version']|int <= 8
become: yes

- name: install VirtualBox
Expand Down
2 changes: 1 addition & 1 deletion roles/virtualbox/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ vboxdrv_required_packages_centos_7:

vboxdrv_required_packages_rhel_8:
- binutils
- qt
- qt5-qtbase
- gcc
- make
- patch
Expand Down