Update usage of apt module, move away from deprecated loop approach

This commit is contained in:
Alexander Grothe
2018-10-05 17:49:39 +02:00
parent febd80390f
commit 96b029fd24
13 changed files with 647 additions and 682 deletions

View File

@@ -6,12 +6,11 @@
- name: install packages
apt:
state: present
name: '{{ item }}'
with_items:
- dkms
- virtualbox-guest-x11-hwe
- virtualbox-guest-dkms-hwe
- virtualbox-guest-x11-hwe
name:
- dkms
- virtualbox-guest-x11-hwe
- virtualbox-guest-dkms-hwe
- virtualbox-guest-x11-hwe
# TODO: set xineliboutput as frontend
when:
@@ -22,11 +21,10 @@
- name: set xineliboutput as frontend
block:
- apt:
name: '{{ item }}'
name:
- vdr-plugin-xineliboutput
- xineliboutput-sxfe
state: present
with_items:
- vdr-plugin-xineliboutput
- xineliboutput-sxfe
- command: '{{ item }}'
with_items:
- vdrctl disable softhddevice

View File

@@ -2,12 +2,11 @@
- name: install nfs server packages
apt:
name: '{{ item }}'
name:
- nfs-kernel-server
- nfs-common
state: present
install_recommends: no
with_items:
- nfs-kernel-server
- nfs-common
- name: create /etc/exports
template:

View File

@@ -10,11 +10,10 @@
- name: install nvidia-396 and other required packages
apt:
name: '{{ item }}'
name:
-nvidia-396
-nvidia-settings
state: present
install_recommends: no
with_items:
- nvidia-396
- nvidia-settings
tags:
- packages

View File

@@ -2,13 +2,12 @@
- name: apt | install pulseaudio, pavucontrol and vdr-plugin-pulsecontrol
apt:
name: '{{ item }}'
name:
- pulseaudio
- pavucontrol
- vdr-plugin-pulsecontrol
state: present
install_recommends: no
with_items:
- pulseaudio
- pavucontrol
- vdr-plugin-pulsecontrol
- name: create /etc/asound.conf with pulseaudio as default device
template:

View File

@@ -3,11 +3,11 @@
- name: install samba server
apt:
name: '{{ item }}'
name:
- samba
- samba-common
- samba-common-bin
- tdb-tools
state: present
install_recommends: no
with_items:
- samba
- samba-common
- samba-common-bin
- tdb-tools

View File

@@ -3,13 +3,12 @@
- name: apt | install basic vdr packages
apt:
name: '{{ item }}'
name:
- vdr
- vdrctl
- vdr-plugin-dbus2vdr
state: present
install_recommends: no
with_items:
- vdr
- vdrctl
- vdr-plugin-dbus2vdr
- name: add svdrp and svdrp-disc to /etc/services
lineinfile:
dest: /etc/services
@@ -48,11 +47,9 @@
# TODO: set recdir, user etc. in /etc/vdr/conf.d/
- name: apt | install additional vdr plugins
apt:
name: '{{ item }}'
name: '{{ vdr_plugins | default([]) }}'
state: present
install_recommends: no
with_items:
'{{ vdr_plugins | default({}) }}'
notify: [ 'Restart VDR' ]
- name: ensure vdr is stopped
systemd:

View File

@@ -31,32 +31,29 @@
skip: true
- name: apt | install basic packages
apt:
name: '{{ item }}'
name:
- anacron
- acl
- at
- bash-completion
#- biosdevname # caution: may change device names after a minimal installation!
- debconf-utils
- linux-firmware
- psmisc
- python-kmodpy
- python-requests
- python-usb
- python3-usb
- software-properties-common
- ssh
- wget
- wpasupplicant
- usbutils
- xfsprogs
state: present
install_recommends: no
with_items:
- anacron
- acl
- at
- bash-completion
#- biosdevname # caution: may change device names after a minimal installation!
- debconf-utils
- linux-firmware
- psmisc
- python-kmodpy
- python-requests
- python-usb
- python3-usb
- software-properties-common
- ssh
- wget
- wpasupplicant
- usbutils
- xfsprogs
- name: apt | install extra packages
apt:
name: '{{ item }}'
name: '{{ extra_packages }}'
state: present
install_recommends: no
with_items:
'{{ extra_packages }}'

View File

@@ -3,17 +3,16 @@
- name: apt | install packages for network services
apt:
name: '{{ item }}'
name:
- avahi-daemon
- avahi-utils
#- biosdevname # caution: this may change device names after a minimal installation!
- ethtool
- nfs-common
- vdr-addon-avahi-linker
- wakeonlan
state: present
install_recommends: no
with_items:
- avahi-daemon
- avahi-utils
#- biosdevname # caution: this may change device names after a minimal installation!
- ethtool
- nfs-common
- vdr-addon-avahi-linker
- wakeonlan
# Does this really work? We need a way to check if an interface supports WOL - Python Skript?
# - name: check WOL capabilities of network interfaces

View File

@@ -3,11 +3,10 @@
- name: apt | install packages for remote support
apt:
name: '{{ item }}'
name:
- yavdr-remote
- lirc
state: present
with_items:
- yavdr-remote
- lirc
tags:
- packages
@@ -41,11 +40,10 @@
- name: apt | install eventlircd and lircd2uinput
apt:
name: '{{ item }}'
name:
- eventlircd
- lircd2uinput
state: present
with_items:
- eventlircd
- lircd2uinput
tags:
- packages

View File

@@ -55,31 +55,29 @@
- name: apt | install packages for xorg
apt:
name: '{{ item }}'
name:
- xlogin
- yavdr-xorg
- xorg
- xserver-xorg-input-all
- xserver-xorg-video-all
- openbox
- python3-dbus2vdr
- python3-yavdrfrontend
- read-edid
- tmux
- vdr-plugin-desktop
- vdr-plugin-osd2web
- feh
#- yavdr-xorg
state: present
with_items:
- xlogin
- yavdr-xorg
- xorg
- xserver-xorg-input-all
- xserver-xorg-video-all
- openbox
- python3-dbus2vdr
- python3-yavdrfrontend
- read-edid
- tmux
- vdr-plugin-desktop
- vdr-plugin-osd2web
- feh
#- yavdr-xorg
- name: apt | install packages for Intel IGP
apt:
name: '{{ item }}'
name:
- xserver-xorg-video-intel
- i965-va-driver-shaders
state: present
with_items:
- xserver-xorg-video-intel
- i965-va-driver-shaders
when: intel_detected
- name: download yavdr logo
@@ -106,9 +104,8 @@
- name: apt | install desktop programs
apt:
name: '{{ item }}'
name:
- xterm
- firefox
- kiosk-browser
state: present
with_items:
- xterm
- firefox
- kiosk-browser