diff --git a/Manual.html b/Manual.html index 9a3201f..451aa5f 100644 --- a/Manual.html +++ b/Manual.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
- +A User wants to install yaVDR without customization and relies on full automation. @@ -527,22 +528,22 @@ Several roles are used to tie everything together:
One of the major problems we faced with customized Ubuntu ISO files as installation media for prior yaVDR versions has been the limited hardware support and the time consuming process to create and update them. An interesting alternative to this approach is to enable the user to choose the installation medium by himself, so point releases, kernel versions and additional drivers can be chosen deliberately. After the basic setup is complete (and a working internet connection is available), a fully customizable install script completes the yaVDR installation.
This is an experimental feature which allows to set up a yaVDR installation based on a normal Ubuntu Server 16.04.x installation using Ansible. @@ -577,20 +578,23 @@ We use a callback to generate tags for all roles autmatically:
if (( $EUID != 0 )); then +set -e +if (( $EUID != 0 )); then echo "This script must be run using sudo -H or as root" exit fi -apt-get -y install software-properties-common # update packages -apt-get update +apt update +apt -y install software-properties-common +add-apt-repository -y ppa:ansible/ansible-2.6 + # install required packages -apt-get -y install --no-install-recommends ansible +apt-get -y install --no-install-recommends ansible python-jmespath # TODO: run ansible on local host ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="all" --extra-vars "first_run=True" @@ -599,12 +603,12 @@ ansible-playbook yavdr07.yml -b -i 'localhost_inventory
The yavdr07.yml
playbook sets up a fully-featured yaVDR installation:
@@ -622,9 +626,9 @@ The yavdr07.yml
playbook sets up a fully-featured yaVDR installatio
- collect-facts # query system facts
- autoinstall-ubuntu-drivers # use ubuntu-drivers to install proprietary dirvers
# (e.g. nvidia, virtualbox)
- - autoinstall-virtualbox-guest
# - nvidia-experimental # install very recent nvidia dirver from ppa:graphics-drivers/ppa
- vdr # install vdr and related packages
+ - autoinstall-virtualbox-guest
- yavdr-network # enable network client capabilities
- samba-install # install samba server
- samba-config # configure samba server
@@ -636,13 +640,14 @@ The yavdr07.yml
playbook sets up a fully-featured yaVDR installatio
- autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found
- autoinstall-targavfd # install vdr-plugin-targavfd if display is connected
- autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected
- - autoinstall-pvr350 # install vdr-plugin-pgvr350 if a matching card is detected
+ - autoinstall-pvr350 # install vdr-plugin-pvr350 if a matching card is detected
- autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found
- autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
- autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected
- autoinstall-atric-usb # preconfigure lircd for Atric IR-WakeupUSB receiver
- autoinstall-yausbir # preconfigure lircd for yaUsbIR receiver
- - autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards
+ - autoinstall-dvbsky-firmware # download and install required firmware files for dvbsky cards
+ - autoinstall-firmware # download and install firmware files for dvb devices
- kodi
- dvd # set up packages and a udev rule to allow kodi and other players
# to play and eject optical media
@@ -655,8 +660,8 @@ The yavdr07.yml
playbook sets up a fully-featured yaVDR installatio
For a headless server installation yavdr07-headless.yml
is a good choice
@@ -678,7 +683,12 @@ For a headless server installation yavdr07-headless.yml
is a good c
- samba-config
- nfs-server
- grub-config
- - autoinstall-satip
+ - autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found
+ - autoinstall-pvr350 # install vdr-plugin-pvr350 if a matching card is detected
+ - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found
+ - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
+ - autoinstall-dvbsky-firmware # download and install required firmware files for dvbsky cards
+ - autoinstall-firmware # download and install firmware files for dvb devices
- wakeup
tags:
- always
@@ -689,8 +699,8 @@ For a headless server installation yavdr07-headless.yml
is a good c
This playbook can either be used to run the installation on the localhost or any other PC in the network that can be accessed via ssh. Simply add the host names or IP addresses to the hosts file in the respective section: @@ -704,12 +714,12 @@ This playbook can either be used to run the installation on the localhost or any
---
@@ -727,8 +737,8 @@ This playbook can either be used to run the installation on the localhost or any
# properties of the user vdr and vdr-related options @@ -754,8 +764,8 @@ This playbook can either be used to run the installation on the localhost or any
# dictionary of directories for (shared) files. Automatically exported via NFS and Samba if those roles are enabled @@ -770,8 +780,8 @@ This playbook can either be used to run the installation on the localhost or any
nfs:
@@ -780,8 +790,8 @@ This playbook can either be used to run the installation on the localhost or any
samba:
@@ -791,8 +801,8 @@ This playbook can either be used to run the installation on the localhost or any
# additional packages you want to install @@ -808,8 +818,8 @@ This playbook can either be used to run the installation on the localhost or any
frontend: vdr
@@ -824,20 +834,20 @@ This playbook can either be used to run the installation on the localhost or any
---
@@ -858,19 +868,19 @@ This playbook can either be used to run the installation on the localhost or any
install nvidia-396 from ppa:graphics-drivers/ppa
---
@@ -900,15 +910,15 @@ install nvidia-396 from ppa:graphics-drivers/ppa
This role is used to set up a basic yaVDR installation. It creates the directories, installs the vdr and other useful packages.
This section is for reference only, please use the files in global_vars
for customizations.
@@ -921,7 +931,7 @@ This section is for reference only, please use the files in global_vars
Automatically installed drivers can be very useful, but if you know you need a certain driver, you can simply set it’s value to true. If you don’t want a driver to be installed, set it’s value to false. @@ -951,7 +961,7 @@ Automatically installed drivers can be very useful, but if you know you need a c
Add additional packages you would like to have on your installation to this list @@ -965,7 +975,7 @@ Add additional packages you would like to have on your installation to this list
This section allows you to set the recording directory, the user and group that runs the vdr and it’s home directory. @@ -998,15 +1008,15 @@ This section allows you to set the recording directory, the user and group that
yavdr-common executes the following tasks:
---
@@ -1023,7 +1033,7 @@ yavdr-common executes the following tasks:
This task prevents apt to automatically install all recommended dependencies for packages: @@ -1040,7 +1050,7 @@ This task prevents apt to automatically install all recommended dependencies for
- name: add PPAs
@@ -1060,34 +1070,22 @@ This task prevents apt to automatically install all recommended dependencies for
- name: apt | ensure debconf and debconf-utils are installed - apt: - name: "{{ packages }}" - vars: - packages: - - debconf - - debconf-utils - -- name: use bash instead of dash by default - debconf: - name: dash - question: dash/sh - value: 'false' - vtype: select - notify: ['Reconfigure unattended upgrades with dpkg'] - +- name: use bash instead of dash + shell: | + echo "set dash/sh false" | debconf-communicate + dpkg-reconfigure -f noninteractive dash
- name: disable release-upgrade notifications
@@ -1109,7 +1107,7 @@ This task prevents apt to automatically install all recommended dependencies for
-
- name: apt | install basic packages
@@ -1141,7 +1139,7 @@ This task prevents apt to automatically install all recommended dependencies for
- name: apt | install extra packages
@@ -1155,14 +1153,14 @@ This task prevents apt to automatically install all recommended dependencies for
{{ ansible_managed | comment('c') }} @@ -1173,7 +1171,7 @@ APT::Install-Suggests "0";
first_run: False
@@ -1201,12 +1199,12 @@ Allow the vdr user to restart vdr.service
and reboot the system
- name: get information about usb and pci hardware and loaded kernel modules @@ -1233,6 +1231,15 @@ Allow the vdr user to restartvdr.service
and reboot the system - amd_detected - virtualbox_detected +- name: get detailed PCI device information + pci_facts: + tags: + - always + +- debug: + var: pci_devices + verbosity: 1 + - name: known vdr output plugins set_fact: vdr_output_plugins: @@ -1246,16 +1253,16 @@ Allow the vdr user to restartvdr.service
and reboot the system
---
@@ -1274,7 +1281,7 @@ Allow the vdr user to restart vdr.service
and reboot the system
- name: add svdrp and svdrp-disc to /etc/services
@@ -1289,7 +1296,7 @@ Allow the vdr user to restart vdr.service
and reboot the system
- name: create vdr recdir
@@ -1324,7 +1331,7 @@ Allow the vdr user to restart vdr.service
and reboot the system
The additional plugins to install can be set in the variable {{vdr_plugins}}
in the group variables
@@ -1342,7 +1349,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
- name: ensure vdr is stopped
@@ -1373,7 +1380,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
- name: create directory for vdr.service systemd drop-in files
@@ -1394,8 +1401,8 @@ The additional plugins to install can be set in the variable {{vdr_plugins
Start after network-online.target @@ -1407,12 +1414,12 @@ Start after network-online.target
LIRC.Up KEY_UP @@ -1547,7 +1554,7 @@ XKeySym.Next XF86AudioNext
# Remote control key macros for VDR @@ -1573,12 +1580,12 @@ User0 @osdteletext
install_avahi: true @@ -1586,8 +1593,8 @@ User0 @osdteletext
---
@@ -1657,15 +1664,15 @@ User0 @osdteletext
---
@@ -1694,12 +1701,12 @@ User0 @osdteletext
/srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
@@ -1710,7 +1717,7 @@ User0 @osdteletext
<?xml version="1.0" standalone='no'?> @@ -1732,12 +1739,12 @@ User0 @osdteletext
lircd0_socket: /var/run/lirc/lircd0
@@ -1745,8 +1752,8 @@ User0 @osdteletext
---
@@ -1819,12 +1826,12 @@ User0 @osdteletext
{% if frontend != 'kodi' %} @@ -1835,7 +1842,7 @@ User0 @osdteletext
[Service]
@@ -1845,7 +1852,7 @@ User0 @osdteletext
{{ ansible_managed | comment }} @@ -2037,17 +2044,17 @@ ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digi
---
@@ -2070,8 +2077,8 @@ ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digi
# Use PulseAudio by default @@ -2094,12 +2101,12 @@ ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digi
The X-Server is started by using the two systemd units xlogin@.service
and x@.service
provided by the package xlogin. The former is enabled (and started) for the vdr user - which results (using the default settings for the user vdr with the uid 666) in the activation of xlogin@vdr.service
when reaching the graphical.target. To simplify starting and stopping the X-server and the desktop session a yavdr-xorg.service
is provided by the package yavdr-xorg
, which depends on the two units mentioned before.
@@ -2128,8 +2135,8 @@ In order to achive a clean shutdown of the session, x@t7.service
is
first_run: False
@@ -2152,12 +2159,12 @@ In order to achive a clean shutdown of the session, x@t7.service
is
---
@@ -2170,7 +2177,7 @@ In order to achive a clean shutdown of the session, x@t7.service
is
---
@@ -2291,7 +2298,7 @@ In order to achive a clean shutdown of the session, x@t7.service
is
---
@@ -2451,7 +2458,7 @@ In order to achive a clean shutdown of the session, x@t7.service
is
KMS drivers (like for intel (i915) and amd (radeon)) require additional configuration beneath a customized xorg.conf
- for a „static“ output configuration (which works if the TV or AV receiver is not turned on) we need to force loading the display(s) EDID early during the boot process.
@@ -2498,12 +2505,12 @@ Please note that rescanning the connected displays works only after removing the
{% set output_flag = 'D' if ("HDMI" in xorg.primary.connector or "DVI" in xorg.primary.connector or "DP" in xorg.primary.connector) else 'e' %} @@ -2513,9 +2520,9 @@ Please note that rescanning the connected displays works only after removing the
# file: roles/yavdr-xorg/templates/systemd/system/x-verbose@.service.j2 @@ -2531,7 +2538,7 @@ Please note that rescanning the connected displays works only after removing the
[Unit]
@@ -2557,7 +2564,7 @@ Please note that rescanning the connected displays works only after removing the
{{ ansible_managed | comment }} @@ -2569,7 +2576,7 @@ Please note that rescanning the connected displays works only after removing the
{{ ansible_managed | comment }} @@ -2583,7 +2590,7 @@ EndSection
Section "Device"
@@ -2909,7 +2916,7 @@ EndSection
-
Set environment variables for system locale and user session on startup @@ -2925,12 +2932,12 @@ Set environment variables for system locale and user session on startup
#!/bin/bash @@ -2956,16 +2963,16 @@ manual_add_modules i915 radeon
---
@@ -3114,14 +3121,14 @@ manual_add_modules i915 radeon
xterm*background: Black @@ -3144,7 +3151,7 @@ XTerm.vt100.font: 7x13
#!/bin/bash @@ -3156,9 +3163,9 @@ XTerm.vt100.font: 7x13 -
# forward environment variables to an environment file and the systemd user session @@ -3194,7 +3201,7 @@ systemctl --user isolate yavdr-desktop.target
<?xml version="1.0" encoding="UTF-8"?> @@ -3983,6 +3990,12 @@ systemctl --user isolate yavdr-desktop.target <!--<skip_pager>yes</skip_pager>--> <skip_taskbar>no</skip_taskbar> </application> + <application title="softhdcuvid"> + <decor>no</decor> + <maximized>yes</maximized> + <!--<skip_pager>yes</skip_pager>--> + <skip_taskbar>no</skip_taskbar> + </application> <application title="vaapidevice"> <decor>no</decor> <maximized>yes</maximized> @@ -4014,7 +4027,7 @@ systemctl --user isolate yavdr-desktop.target
<?xml version="1.0" encoding="UTF-8"?> @@ -4803,6 +4816,12 @@ systemctl --user isolate yavdr-desktop.target <!--<skip_pager>yes</skip_pager>--> <skip_taskbar>no</skip_taskbar> </application> + <application title="softhdcuvid"> + <decor>no</decor> + <maximized>yes</maximized> + <!--<skip_pager>yes</skip_pager>--> + <skip_taskbar>no</skip_taskbar> + </application> <application title="vaapidevice"> <decor>no</decor> <maximized>yes</maximized> @@ -4837,9 +4856,9 @@ systemctl --user isolate yavdr-desktop.target -
[Unit] @@ -4852,7 +4871,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -4868,7 +4887,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -4890,7 +4909,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -4913,7 +4932,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -4932,7 +4951,7 @@ systemctl --user isolate yavdr-desktop.target
[Unit]
@@ -4951,7 +4970,7 @@ systemctl --user isolate yavdr-desktop.target
-
irexec.service starts irexec for the user session @@ -4985,12 +5004,12 @@ end
---
@@ -5012,12 +5031,12 @@ end
---
@@ -5042,14 +5061,14 @@ end
{{ ansible_managed | comment }} @@ -5135,7 +5154,7 @@ end
{% for name, path in media_dirs.iteritems() %} @@ -5157,7 +5176,7 @@ end
include = /etc/samba/smb.conf.custom @@ -5170,15 +5189,15 @@ end
It would be nice to be able to detect if it is suitable to install those drivers:
Vendor-IDs: @@ -5189,7 +5208,7 @@ Vendor-IDs:
https://github.com/s-moch/linux-saa716x - kann man den relevanten Teil als dkms-Paket bauen? @@ -5209,15 +5228,15 @@ Vendor-IDs:
The tool ubuntu-drivers is used to install the matching driver version for nvidia graphics cards, virtualbox guest additions and Intel and AMD microcode updates.
---
@@ -5240,8 +5259,8 @@ The tool ubuntu-drivers is used to install the matching driver version for nvidi
This role installs the guest additions for virtualbox guests on Ubuntu 16.04 @@ -5286,18 +5305,18 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04 - vdrctl enable xineliboutput ignore_errors: yes when: - - ansible_virtualization_type == "virtualbox" + - ansible_virtualization_type == "virtualbox" or ansible_virtualization_type == "VMware" - ansible_virtualization_role == "guest"
---
@@ -5309,8 +5328,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
---
@@ -5352,8 +5371,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
{{ ansible_managed | comment }} @@ -5382,12 +5401,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
---
@@ -5398,8 +5417,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
---
@@ -5441,8 +5460,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
{{ ansible_managed | comment }} @@ -5470,15 +5489,15 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
If a Sat>IP Server responds to a discovery request, the package vdr-plugin-satip is installed.
---
@@ -5503,12 +5522,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -5524,12 +5543,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -5545,12 +5564,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -5566,12 +5585,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -5587,8 +5606,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -5603,12 +5622,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -5619,38 +5638,54 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
--- # This role provides easyily downloadable firmware files -- name: Firmware for Hauppauge WinTV HD Solo/Duo, PCTV 292e +- name: Firmware dvb-demod-si2168-b40-01.fw for Hauppauge WinTV HD Solo/Duo, PCTV 292e get_url: url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-demod-si2168-b40-01.fw checksum: sha256:8507536630d75a316d0719d6b95c04b90c36baa5b457ad457c9bacadafcef134 dest: /lib/firmware/dvb-demod-si2168-b40-01.fw when: '"2040:0264" in usb or "2013:025f" in usb' -- name: Firmware for Hauppauge WinTV-HVR-930C +- name: Firmware dvb-fe-xc5000-1.6.114.fw for Hauppauge WinTV-HVR-930C get_url: url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/dvb-fe-xc5000-1.6.114.fw checksum: sha256:7104bda8df301fe1bd4c09de1708aeb6d0d8e1f9d55505449fecfad82639235f dest: /lib/firmware/dvb-fe-xc5000-1.6.114.fw when: '"2040:1605" in usb' + +- name: Firmware ngenge_18.fw for ngene cards + get_url: + url: http://l4m-daten.de/downloads/firmware/dvb-s2/linux/all/ngene_18.fw + checksum: sha256:213d98ec2cd575eba15d82ee79fed7098e670de43792f8aa773a95cfb7c32060 + dest: /lib/firmware/ngene_18.fw + when: '"ngene" in modules' + notify: reboot required + +- name: Firmware drxk_a3.mc for drxk + get_url: + url: https://github.com/OpenELEC/dvb-firmware/raw/master/firmware/drxk_a3.mc + checksum: sha256:f8956ad6f92a4ce90a6ab94ed23e2f9a27e9317e936fd3e0119778dd28e7e294 + dest: /lib/firmware/drxk_a3.mc + when: '"ngene" in modules or "drxk" in modules' + notify: reboot required
---
@@ -5661,8 +5696,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -5672,8 +5707,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
---
@@ -5723,15 +5758,15 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware sollte in yavdr-firmware stecken
---
@@ -5742,8 +5777,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -5760,12 +5795,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -5776,8 +5811,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -5795,12 +5830,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -5811,8 +5846,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
---
@@ -5828,19 +5863,19 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
- import_tasks: install-kodi.yml tags=install,update,kodi:install - import_tasks: configure-kodi.yml tags=install,update,kodi:configure @@ -5848,7 +5883,7 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
--- @@ -5861,12 +5896,26 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll with_items: - kodi - kodi-pvr-vdr-vnsi - - kodi-eventclients-kodi-send # for ubuntu packages, team-xbmc uses "kodi-eventclients-xbmc-send for some reason + +- name: apt | install kodi-send (team-xbmc PPA) + apt: + name: "kodi-eventclients-xbmc-send" # team-xbmc uses "kodi-eventclients-xbmc-send for some reason + state: present + install_recommends: no + register: team_xbmc_ppa + ignore_errors: True + +- name: apt | install kodi-send (Ubuntu package) + apt: + name: "kodi-eventclients-kodi-send" # fallback to ubuntu package + state: present + install_recommends: no + when: team_xbmc_ppa.failed
- name: create kodi.service for the user session
@@ -5915,12 +5964,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
This systemd unit for the user session starts (and stops) kodi. @@ -5936,7 +5985,7 @@ This systemd unit for the user session starts (and stops) kodi. ExecStart=/usr/bin/kodi -l /run/lirc/lircd ExecStop=/bin/bash -c "/usr/bin/kodi-send --action=QUIT; while ps -p $MAINPID -o comm=; do sleep .25; done" TimeoutStopSec=10 -SuccessExitStatus=0 127 +SuccessExitStatus=0 127 SIGKILL Restart=on-failure
Those configuration files provide a preconfiguration for kodi which overrides the system wide configuration
This file maps the keys defined in Lircmap.xml to actions within kodi.
<?xml version="1.0" encoding="UTF-8"?> @@ -6583,17 +6632,17 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
--- # file: roles/dvd/tasks/main.yml @@ -6626,6 +6675,7 @@ This file maps the keys defined in Lircmap.xml to actions within kodi. shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules args: creates: /etc/udev/rules.d/60-cdrom_id.rules + warn: false
---
@@ -6690,8 +6740,8 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
# ----- GLOBAL SECTION ----- @@ -6797,8 +6847,8 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
---
@@ -7039,12 +7089,12 @@ EndSection
---
@@ -7054,8 +7104,8 @@ EndSection
---
@@ -7076,8 +7126,8 @@ EndSection
{{ ansible_managed | comment }} @@ -7103,12 +7153,12 @@ ACPI_START_AHEAD=5
system:
@@ -7120,8 +7170,8 @@ ACPI_START_AHEAD=5
---
@@ -7146,8 +7196,8 @@ ACPI_START_AHEAD=5
#!/bin/sh @@ -7170,8 +7220,8 @@ menuentry "PowerOff" {
--- @@ -7194,15 +7244,15 @@ menuentry "PowerOff" {
This section contains custom modules for the yaVDR Playbooks. They are used to collect facts about the system and configure applications and daemons.
# This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules. @@ -7380,10 +7430,87 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
+# This module parses the output of lspci for detailed information about available (sub) devices. +DOCUMENTATION = ''' + --- + module: pci_facts + short_description: parses lspci output for detailed (sub) devices data + description: + - This module parses the output of lspci for detailed information about available (sub) devices. + - returns a list with a dict for each device + +notes: + - requires lspci (package pciutils) + +''' + +EXAMPLES = ''' +- name: get detailled pci device infos + pci_facts: + +- debug: + var: pci_devices +''' + + +import argparse +import shlex +import subprocess +from collections import namedtuple + +from ansible.module_utils.basic import * + +def convert2hex(arg): + arg = arg.strip('"') + if arg: + return int(arg, 16) + else: + return None + +def parse_lspci_data(): + parser = argparse.ArgumentParser() + parser.add_argument('-r', '--revision', help='revision', type=convert2hex) + parser.add_argument('-p', '--progif', help='proginf', type=convert2hex) + parser.add_argument('slot') + parser.add_argument('device_class', type=convert2hex) + parser.add_argument('vendor_id', type=convert2hex) + parser.add_argument('device_id', type=convert2hex) + parser.add_argument('sub_vendor_id', type=convert2hex) + parser.add_argument('sub_device_id', type=convert2hex) + parser.add_argument('other', nargs='*', default=[]) + + devices = [] + for line in subprocess.check_output(['lspci', '-nm'], universal_newlines=True).splitlines(): + args = parser.parse_args(args=shlex.split(line)) + devices.append(vars(args)) + return devices + + +def main(): + arg_specs = {} + module = AnsibleModule(argument_spec=arg_specs, supports_check_mode=True,) + try: + pci_devices = parse_lspci_data() + except: + module.fail_json(msg="Something fatal happened") + data = {'pci_devices': pci_devices} + module.exit_json(changed=False, ansible_facts=data, msg=data) + +if __name__ == '__main__': + main() ++
DOCUMENTATION = ''' --- module: hardware_facts @@ -7505,9 +7632,9 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
[ ]
support multiple screens (-d :0.0 .. :0.n)- name: Reconfigure unattended upgrades with dpkg @@ -7876,6 +8003,10 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c name: x@vt7.service state: stopped register: x_stop + +- name: reboot required + debug: + msg: PLEASE REBOOT YOUR SYSTEM.