19 lines
630 B
YAML
19 lines
630 B
YAML
- name: Get VirtualBox APT key
|
|
become: true
|
|
get_url:
|
|
url: https://www.virtualbox.org/download/oracle_vbox_2016.asc
|
|
dest: /etc/apt/trusted.gpg.d/oracle_vbox_2016.asc
|
|
- name: Install VirtualBox APT repository
|
|
become: true
|
|
apt_repository:
|
|
repo: "deb [arch=amd64 signed-by=/etc/apt/trusted.gpg.d/oracle_vbox_2016.asc] https://download.virtualbox.org/virtualbox/debian {{ ansible_distribution_release }} contrib"
|
|
register: apt_repository
|
|
- name: Update APT cache
|
|
become: true
|
|
apt:
|
|
update_cache: true
|
|
when: apt_repository.changed
|
|
- name: Install VirtualBox
|
|
become: true
|
|
apt:
|
|
name: virtualbox-6.1
|