42 lines
1.2 KiB
YAML
42 lines
1.2 KiB
YAML
---
|
|
# file roles/autoinstall-virtualbox-guest/tasks/main.yml
|
|
|
|
- name: collect facts about installed packages
|
|
package_facts:
|
|
manager: "apt"
|
|
|
|
- name: install virtualbox guest additions
|
|
block:
|
|
- name: install packages
|
|
apt:
|
|
state: present
|
|
name:
|
|
- dkms
|
|
- '{{ "virtualbox-guest-x11-hwe" if "xserver-xorg-hwe-18.04" in ansible_facts.packages else "virtualbox-guest-x11" }}'
|
|
- '{{ "virtualbox-guest-dkms-hwe" if "linux-generic-hwe-18.04" in ansible_facts.packages else "virtualbox-guest-dkms" }}'
|
|
|
|
# TODO: set xineliboutput as frontend
|
|
when:
|
|
- ansible_virtualization_type == "virtualbox"
|
|
- ansible_virtualization_role == "guest"
|
|
- ansible_distribution == "Ubuntu"
|
|
|
|
- name: set xineliboutput as frontend
|
|
block:
|
|
- apt:
|
|
name:
|
|
- vdr-plugin-xineliboutput
|
|
- xineliboutput-sxfe
|
|
state: present
|
|
- command: '{{ item }}'
|
|
with_items:
|
|
- vdrctl disable softhddevice
|
|
- vdrctl disable vaapidevice
|
|
- vdrctl disable xine
|
|
- vdrctl disable pvr350
|
|
- vdrctl enable xineliboutput
|
|
ignore_errors: yes
|
|
when:
|
|
- ansible_virtualization_type in ["virtualbox", "VirtualPC", "VMware"]
|
|
- ansible_virtualization_role == "guest"
|