-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move VirtualBox-related stuff to its own role.
- Loading branch information
1 parent
0951af0
commit d107a63
Showing
8 changed files
with
49 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file was written by Damien Dart, <[email protected]>. This is | ||
# free and unencumbered software released into the public domain. For | ||
# more information, please refer to the accompanying "UNLICENCE" file. | ||
|
||
--- | ||
virtualbox__vboxusers_users: [] | ||
virtualbox__virtualbox_version: '7.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# This file was written by Damien Dart, <[email protected]>. This is | ||
# free and unencumbered software released into the public domain. For | ||
# more information, please refer to the accompanying "UNLICENCE" file. | ||
|
||
--- | ||
dependencies: [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Installs VirtualBox. | ||
# | ||
# This file was written by Damien Dart, <[email protected]>. This is | ||
# free and unencumbered software released into the public domain. For | ||
# more information, please refer to the accompanying "UNLICENCE" file. | ||
|
||
--- | ||
- name: 'Ensure the VirtualBox package signing key is present for APT' | ||
ansible.builtin.apt_key: | ||
state: 'present' | ||
url: 'https://www.virtualbox.org/download/oracle_vbox_2016.asc' | ||
|
||
- name: 'Ensure the VirtualBox repository is present in APT sources list' | ||
ansible.builtin.apt_repository: | ||
repo: 'deb http://download.virtualbox.org/virtualbox/debian {{ ansible_distribution_release }} contrib' | ||
state: 'present' | ||
|
||
- name: 'Ensure VirtualBox is installed' | ||
ansible.builtin.apt: | ||
force_apt_get: true | ||
name: 'virtualbox-{{ virtualbox__virtualbox_version }}' | ||
state: 'present' | ||
|
||
# To access USB devices from VirtualBox guests, the host user must | ||
# be a member of the "vboxusers" group. For more information, see | ||
# <https://www.virtualbox.org/manual/ch02.html#install-linux-vboxusers>. | ||
- name: 'Ensure specified users have access to USB devices in VirtualBox' | ||
ansible.builtin.user: | ||
name: '{{ item }}' | ||
groups: 'vboxusers' | ||
append: true | ||
loop: '{{ [virtualbox__vboxusers_users] | flatten }}' | ||
notify: 'Notify user about "vboxusers" group membership update' |