Add additional files

This commit is contained in:
Alexander Grothe
2017-11-22 10:09:51 +01:00
parent 885b5bd893
commit 4ed8729282
3 changed files with 65 additions and 23 deletions

View File

@@ -1,15 +1,18 @@
---
# file roles/autoinstall-ubuntu-drivers/tasks/main.yml
- name: apt | install ubuntu-drivers-common
apt:
name: ubuntu-drivers-common
state: present
- name: ensure /etc/yavdr exists
file:
path: /etc/yavdr
state: directory
mode: 0755
- name: autoinstall ubuntu-drivers-common
block:
- name: apt | install ubuntu-drivers-common
apt:
name: ubuntu-drivers-common
state: present
- name: let ubuntu-drivers automatically install additional drivers
command: ubuntu-drivers --package-list /etc/yavdr/autoinstalled autoinstall
- name: let ubuntu-drivers automatically install additional drivers
command: ubuntu-drivers --package-list /etc/yavdr/autoinstalled autoinstall
when:
- ansible_virtualization_type =! "virtualbox"
- ansible_virtualization_role =! "guest"
- ansible_distribution == "Ubuntu"
- ansible_distribution_version != "16.04" # ubuntu-drivers-common tries to autoinstall
# conflicting packages for virtualbox :(