From c706146eace789b0933c2cbf3f9b90a8da05d2f6 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Sun, 10 Mar 2019 20:35:58 +0100 Subject: [PATCH] Update Manual.org and Manual.html --- Manual.html | 1469 ++++++++++------- Manual.org | 117 +- roles/yavdr-common/tasks/configure_system.yml | 1 + 3 files changed, 984 insertions(+), 603 deletions(-) diff --git a/Manual.html b/Manual.html index b1eaaae..1a0cf6d 100644 --- a/Manual.html +++ b/Manual.html @@ -3,7 +3,7 @@ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - + Ansible Playbooks for yaVDR 0.7 @@ -253,275 +253,283 @@ for the JavaScript code in this tag.

Inhaltsverzeichnis

-
-

1 User Stories

+
+

1 User Stories

-
-

1.1 yavdr-full

+
+

1.1 yavdr-full

A User wants to install yaVDR without customization and relies on full automation. @@ -554,24 +562,24 @@ Several roles are used to tie everything together:

-
-

1.1.1 Using vdr, pulseaudio and xorg together

+
+

1.1.1 Using vdr, pulseaudio and xorg together

-
-

2 Introduction

+
+

2 Introduction

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.

-
-

3 Installing and configuring yaVDR with Ansible

+
+

3 Installing and configuring yaVDR with Ansible

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. @@ -606,8 +614,8 @@ We use a callback to generate tags for all roles autmatically:

-
-

3.1 Install scripts for local usage

+
+

3.1 Install scripts for local usage

set -e
@@ -626,7 +634,6 @@ 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"
-dpkg-reconfigure libdvd-pkg
 
@@ -652,12 +659,12 @@ ansible-playbook yavdr07-headless.yml -b -i 'localhost_
-
-

4 Playbooks

+
+

4 Playbooks

-
-

4.1 yavdr07.yml

+
+

4.1 yavdr07.yml

The yavdr07.yml playbook sets up a fully-featured yaVDR installation: @@ -698,6 +705,7 @@ The yavdr07.yml playbook sets up a fully-featured yaVDR installatio - autoinstall-dvbsky-firmware # download and install required firmware files for dvbsky cards - autoinstall-firmware # download and install firmware files for dvb devices #- serial-ir # configure a serial port for "homebrew" ir receivers (e.g. Atric V5) + #- epgd # install vdr-epg-daemon (and vdr-plugin-epg2vdr) - kodi - dvd # set up packages and a udev rule to allow kodi and other players # to play and eject optical media @@ -710,8 +718,8 @@ The yavdr07.yml playbook sets up a fully-featured yaVDR installatio

-
-

4.2 yavdr07-headless.yml

+
+

4.2 yavdr07-headless.yml

For a headless server installation yavdr07-headless.yml is a good choice @@ -739,6 +747,7 @@ For a headless server installation yavdr07-headless.yml is a good c - 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 + #- epgd # install vdr-epg-daemon - wakeup tags: - always @@ -749,8 +758,8 @@ For a headless server installation yavdr07-headless.yml is a good c

-
-

5 Hosts

+
+

5 Hosts

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: @@ -764,12 +773,12 @@ This playbook can either be used to run the installation on the localhost or any

-
-

6 Group Variables

+
+

6 Group Variables

-
-

6.1 PPAs

+
+

6.1 PPAs

---
@@ -787,8 +796,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.2 VDR user, directories, special configuration and plugins

+
+

6.2 VDR user, directories, special configuration and plugins

# properties of the user vdr and vdr-related options
@@ -814,8 +823,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.3 Media directories

+
+

6.3 Media directories

# dictionary of directories for (shared) files. Automatically exported via NFS and Samba if those roles are enabled
@@ -830,8 +839,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.4 NFS

+
+

6.4 NFS

nfs:
@@ -840,8 +849,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.5 Samba

+
+

6.5 Samba

samba:
@@ -851,8 +860,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.6 Additional packages

+
+

6.6 Additional packages

# additional packages you want to install
@@ -871,8 +880,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.7 System pre-configuration

+
+

6.7 System pre-configuration

frontend: vdr
@@ -886,8 +895,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.8 Serial IR

+
+

6.8 Serial IR

# Serial device to configure for a homebrew receiver.
@@ -899,20 +908,20 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

7 Roles

+
+

7 Roles

-
-

7.1 install-dependencies

+
+

7.1 install-dependencies

-
-

7.1.1 tasks

+
+

7.1.1 tasks

    -
  1. main.yml
    +
  2. main.yml
    ---
    @@ -930,19 +939,19 @@ This playbook can either be used to run the installation on the localhost or any
     
-
-

7.2 nvidia experimental drivers

+
+

7.2 nvidia experimental drivers

install nvidia-396 from ppa:graphics-drivers/ppa

-
-

7.2.1 tasks

+
+

7.2.1 tasks

    -
  1. main.yml
    +
  2. main.yml
    ---
    @@ -958,8 +967,8 @@ install nvidia-396 from ppa:graphics-drivers/ppa
     - name: install nvidia-396 and other required packages
       apt:
         name:
    -      -nvidia-396
    -      -nvidia-settings
    +      - nvidia-396
    +      - nvidia-settings
         state: present
         install_recommends: no
       tags:
    @@ -971,15 +980,15 @@ install nvidia-396 from ppa:graphics-drivers/ppa
     
-
-

7.3 yavdr-common

+
+

7.3 yavdr-common

This role is used to set up a basic yaVDR installation. It creates the directories, installs the vdr and other useful packages.

-
-

7.3.1 default variables

+
+

7.3.1 default variables

This section is for reference only, please use the files in global_vars for customizations. @@ -992,7 +1001,7 @@ This section is for reference only, please use the files in global_vars

    -
  1. Repositories
    +
  2. Repositories

    You can set a list of package repositories which provide the necessary packages. Feel free to use own PPAs if you need special customization to the VDR and it’s plugins. @@ -1009,7 +1018,7 @@ You can set a list of package repositories which provide the necessary packages.

-
  • Drivers
    +
  • Drivers

    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. @@ -1022,7 +1031,7 @@ Automatically installed drivers can be very useful, but if you know you need a c

  • -
  • Additional Packages
    +
  • Additional Packages

    Add additional packages you would like to have on your installation to this list @@ -1036,7 +1045,7 @@ Add additional packages you would like to have on your installation to this list

  • -
  • VDR
    +
  • VDR

    This section allows you to set the recording directory, the user and group that runs the vdr and it’s home directory. @@ -1069,15 +1078,15 @@ This section allows you to set the recording directory, the user and group that

  • -
    -

    7.3.2 tasks

    +
    +

    7.3.2 tasks

    yavdr-common executes the following tasks:

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -1095,7 +1104,7 @@ yavdr-common executes the following tasks:
       
        -
      1. Disable default installation of recommended packages
        +
      2. Disable default installation of recommended packages

        This task prevents apt to automatically install all recommended dependencies for packages: @@ -1112,7 +1121,7 @@ This task prevents apt to automatically install all recommended dependencies for

    -
  • Set up package repositories
    +
  • Set up package repositories
    - name: add PPAs
    @@ -1132,7 +1141,7 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • Use bash instead of dash
    +
  • Use bash instead of dash
    - name: use bash instead of dash
    @@ -1144,15 +1153,15 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • create user vdr
    +
  • create user vdr
  • -
  • Disable release-upgrade notifications
    +
  • Disable release-upgrade notifications
      -
    1. SOMEDAY move from lineinfile to template
      +
    2. SOMEDAY move from lineinfile to template
      - name: disable release-upgrade notifications
      @@ -1174,7 +1183,7 @@ This task prevents apt to automatically install all recommended dependencies for
       
  • -
  • Install essential packages
    +
  • Install essential packages
    - name: apt | install basic packages
    @@ -1188,6 +1197,7 @@ This task prevents apt to automatically install all recommended dependencies for
           - debconf-utils
           - linux-firmware
           - psmisc
    +      - python-jmespath
           - python-kmodpy
           - python-requests
           - python-usb
    @@ -1205,7 +1215,7 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • Install additional packages (user defined)
    +
  • Install additional packages (user defined)
    - name: apt | install extra packages
    @@ -1218,15 +1228,15 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • create directories
    +
  • create directories
  • -
  • create sudoers drop-in for vdr
    +
  • create sudoers drop-in for vdr
  • -
  • basic scripts for standby support
    +
  • basic scripts for standby support

    Stop vdr before entering suspend and unload dvb modules, reverse this operation on resume @@ -1237,8 +1247,8 @@ Stop vdr before entering suspend and unload dvb modules, reverse this operation

  • -
    -

    7.3.3 templates

    +
    +

    7.3.3 templates

    {{ ansible_managed | comment('c') }}
    @@ -1249,7 +1259,7 @@ APT::Install-Suggests "0";
     
      -
    1. yavdr sudoers drop-in
      +
    2. yavdr sudoers drop-in

      Allow the vdr user to restart vdr.service and reboot the system @@ -1261,7 +1271,7 @@ Allow the vdr user to restart vdr.service and reboot the system

    -
  • suspend hooks
    +
  • suspend hooks
    #!/bin/bash
    @@ -1290,7 +1300,7 @@ Allow the vdr user to restart vdr.service and reboot the system
     
  • -
  • module-helper
    +
  • module-helper
    #!/usr/bin/env python3
    @@ -1377,12 +1387,12 @@ Allow the vdr user to restart vdr.service and reboot the system
     
     
    -
    -

    7.4 collect facts about the system with custom modules

    +
    +

    7.4 collect facts about the system with custom modules

    -
    -

    7.4.1 variables

    +
    +

    7.4.1 variables

    first_run: False
    @@ -1390,12 +1400,12 @@ Allow the vdr user to restart vdr.service and reboot the system
     
    -
    -

    7.4.2 tasks

    +
    +

    7.4.2 tasks

      -
    1. main.yml
      +
    2. main.yml
      - name: get information about usb and pci hardware and loaded kernel modules
      @@ -1444,16 +1454,16 @@ Allow the vdr user to restart vdr.service and reboot the system
       
    -
    -

    7.5 vdr

    +
    +

    7.5 vdr

    -
    -

    7.5.1 tasks

    +
    +

    7.5.1 tasks

      -
    1. install the basic vdr packages
      +
    2. install the basic vdr packages
      ---
      @@ -1471,7 +1481,7 @@ Allow the vdr user to restart vdr.service and reboot the system
       
    3. -
    4. Add svdrp/svdrp-disc to /etc/services
      +
    5. Add svdrp/svdrp-disc to /etc/services
      - name: add svdrp and svdrp-disc to /etc/services
      @@ -1486,7 +1496,7 @@ Allow the vdr user to restart vdr.service and reboot the system
       
    6. -
    7. Set up the recording directory for the vdr user
      +
    8. Set up the recording directory for the vdr user
      - name: create vdr recdir
      @@ -1521,7 +1531,7 @@ Allow the vdr user to restart vdr.service and reboot the system
       
    9. -
    10. Install additional vdr plugins
      +
    11. Install additional vdr plugins

      The additional plugins to install can be set in the variable {{vdr_plugins}} in the group variables @@ -1537,7 +1547,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins

  • -
  • copy vdr configuration files (if they don’t exist yet)
    +
  • copy vdr configuration files (if they don’t exist yet)
    - name: ensure vdr is stopped
    @@ -1568,7 +1578,7 @@ The additional plugins to install can be set in the variable {{vdr_plugins
     
  • -
  • start vdr after network-online.target
    +
  • start vdr after network-online.target
    - name: create directory for vdr.service systemd drop-in files
    @@ -1589,8 +1599,8 @@ The additional plugins to install can be set in the variable {{vdr_plugins
     
     
    -
    -

    7.5.2 templates

    +
    +

    7.5.2 templates

    Start after network-online.target @@ -1602,12 +1612,12 @@ Start after network-online.target

    -
    -

    7.5.3 files

    +
    +

    7.5.3 files

      -
    1. remote.conf
      +
    2. remote.conf
      LIRC.Up KEY_UP
      @@ -1742,7 +1752,7 @@ XKeySym.Next       XF86AudioNext
       
    3. -
    4. keymacros.conf
      +
    5. keymacros.conf
      # Remote control key macros for VDR
      @@ -1768,12 +1778,12 @@ User0     @osdteletext
       
    -
    -

    7.6 STARTED yavdr-network

    +
    +

    7.6 STARTED yavdr-network

    -
    -

    7.6.1 default variables

    +
    +

    7.6.1 default variables

    install_avahi: true
    @@ -1781,8 +1791,8 @@ User0     @osdteletext
     
    -
    -

    7.6.2 tasks

    +
    +

    7.6.2 tasks

    ---
    @@ -1850,12 +1860,12 @@ User0     @osdteletext
     
    -
    -

    7.7 vdr-plugin-menuorg

    +
    +

    7.7 vdr-plugin-menuorg

    -
    -

    7.7.1 tasks

    +
    +

    7.7.1 tasks

    ---
    @@ -1877,8 +1887,8 @@ User0     @osdteletext
     
    -
    -

    7.7.2 templates

    +
    +

    7.7.2 templates

    <?xml version="1.0" encoding="UTF-8"?>                                                                                                                      
    @@ -1937,17 +1947,17 @@ User0     @osdteletext
     
    -
    -

    7.8 nfs-server

    +
    +

    7.8 nfs-server

    -
    -

    7.8.1 TODO avahi-services für NFS beim Stoppen des nfs-kernel-servers depublizieren, beim Start wieder announcen

    +
    +

    7.8.1 TODO avahi-services für NFS beim Stoppen des nfs-kernel-servers depublizieren, beim Start wieder announcen

    -
    -

    7.8.2 tasks

    +
    +

    7.8.2 tasks

    ---
    @@ -1975,23 +1985,23 @@ User0     @osdteletext
     
    -
    -

    7.8.3 templates

    +
    +

    7.8.3 templates

      -
    1. /etc/exports
      +
    2. /etc/exports
      /srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
      -{% for name, path in media_dirs.iteritems() %}
      +{% for name, path in media_dirs.items() | list %}
       {{ path }} *(rw,fsid={{ loop.index }},sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }}{{ ',insecure' if nfs.insecure else '' }})
       {% endfor %}
       
    3. -
    4. avahi services
      +
    5. avahi services
      <?xml version="1.0" standalone='no'?>
      @@ -2012,15 +2022,15 @@ User0     @osdteletext
       
    -
    -

    7.9 yavdr-remote

    +
    +

    7.9 yavdr-remote

    The role yavdr-remote sets up the foundation for using eventlircd, lircd2uinput and the pre-configuration for remote receivers which can be detected by udev.

    -
    -

    7.9.1 default variables

    +
    +

    7.9.1 default variables

    lircd0_socket: /var/run/lirc/lircd0
    @@ -2028,8 +2038,8 @@ The role yavdr-remote sets up the foundation for using eventlircd,
     
    -
    -

    7.9.2 tasks

    +
    +

    7.9.2 tasks

    ---
    @@ -2100,12 +2110,12 @@ The role yavdr-remote sets up the foundation for using eventlircd,
     
    -
    -

    7.9.3 templates

    +
    +

    7.9.3 templates

      -
    1. Systemd Drop-in to start vdr with lirc support
      +
    2. Systemd Drop-in to start vdr with lirc support
      {% if frontend != 'kodi' %}
      @@ -2116,7 +2126,7 @@ The role yavdr-remote sets up the foundation for using eventlircd,
       
    3. -
    4. Systemd Drop-in to start lircd2uinput with lircd
      +
    5. Systemd Drop-in to start lircd2uinput with lircd
      [Service]
      @@ -2126,7 +2136,7 @@ The role yavdr-remote sets up the foundation for using eventlircd,
       
    6. -
    7. create /etc/rc_maps.cfg
      +
    8. create /etc/rc_maps.cfg
      {{ ansible_managed | comment }}
      @@ -2318,12 +2328,12 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
       
    -
    -

    7.10 pulseaudio

    +
    +

    7.10 pulseaudio

    -
    -

    7.10.1 tasks

    +
    +

    7.10.1 tasks

    ---
    @@ -2345,8 +2355,8 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
     
    -
    -

    7.10.2 templates

    +
    +

    7.10.2 templates

    # Use PulseAudio by default
    @@ -2368,12 +2378,12 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
     
    -
    -

    7.11 yavdr-xorg

    +
    +

    7.11 yavdr-xorg

    -
    -

    7.11.1 About the GUI session

    +
    +

    7.11.1 About the GUI session

    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. @@ -2402,8 +2412,8 @@ In order to achive a clean shutdown of the session, x@t7.service is

    -
    -

    7.11.2 default variables

    +
    +

    7.11.2 default variables

    first_run: False
    @@ -2426,12 +2436,12 @@ In order to achive a clean shutdown of the session, x@t7.service is
     
    -
    -

    7.11.3 tasks

    +
    +

    7.11.3 tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -2444,7 +2454,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    3. -
    4. setup-xorg.yml
      +
    5. setup-xorg.yml
      ---
      @@ -2562,7 +2572,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    6. -
    7. detect-xorg.yml
      +
    8. detect-xorg.yml
      ---
      @@ -2750,7 +2760,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    9. -
    10. intel.yml
      +
    11. intel.yml

      KMS drivers (like for intel (i915) and amd (radeon)) require additional configuration besides 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. @@ -2798,12 +2808,12 @@ Please note that rescanning the connected displays works only after removing the

    -
    -

    7.11.4 templates

    +
    +

    7.11.4 templates

      -
    1. grub
      +
    2. grub
      {{ ansible_managed | comment }}
      @@ -2813,11 +2823,11 @@ Please note that rescanning the connected displays works only after removing the
       
    3. -
    4. xorg
      +
    5. xorg
        -
      1. x-verbose@.service
        +
      2. x-verbose@.service
        # file: roles/yavdr-xorg/templates/systemd/system/x-verbose@.service.j2
        @@ -2833,7 +2843,7 @@ Please note that rescanning the connected displays works only after removing the
         
      3. -
      4. Drop-in snippet for x@.service
        +
      5. Drop-in snippet for x@.service
        [Unit]
        @@ -2859,7 +2869,7 @@ Please note that rescanning the connected displays works only after removing the
         
      6. -
      7. Drop-in snippet for vdr.service
        +
      8. Drop-in snippet for vdr.service
        {{ ansible_managed | comment }}
        @@ -2871,7 +2881,7 @@ Please note that rescanning the connected displays works only after removing the
         
      9. -
      10. xorg.conf snippets
        +
      11. xorg.conf snippets
        {{ ansible_managed | comment }}
        @@ -2886,7 +2896,7 @@ EndSection
         
      12. -
      13. intel graphics xorg.conf snippet
        +
      14. intel graphics xorg.conf snippet
        {{ ansible_managed | comment }}
        @@ -2981,7 +2991,7 @@ Section "Monitor"
         EndSection
         
         {% endif %}
        -{% for connector, data in xrandr["Screen 0:"].iteritems() %}
        +{% for connector, data in xrandr["Screen 0:"].items() | list %}
         {% if not data.is_connected or connector != xorg.primary.connector or (xorg.secondary is defined and connector != xorg.secondary.connector) %}
         Section "Monitor"
           Identifier "{{ connector|replace("-","") }}"
        @@ -2994,7 +3004,7 @@ EndSection
         
      15. -
      16. xorg.conf
        +
      17. xorg.conf
        {{ ansible_managed | comment }}
        @@ -3320,7 +3330,7 @@ EndSection
         
      18. -
      19. snippet to disable screen blanking
        +
      20. snippet to disable screen blanking
        {{ ansible_managed | comment }}
        @@ -3337,7 +3347,7 @@ EndSection
         
    6. -
    7. vdr
      +
    8. vdr

      Set environment variables for system locale and user session on startup @@ -3353,12 +3363,12 @@ Set environment variables for system locale and user session on startup

    -
    -

    7.11.5 files

    +
    +

    7.11.5 files

      -
    1. initramfs EDID hook
      +
    2. initramfs EDID hook
      #!/bin/bash
      @@ -3383,16 +3393,16 @@ exit 0
       
    -
    -

    7.12 yavdr-desktop

    +
    +

    7.12 yavdr-desktop

    -
    -

    7.12.1 Tasks

    +
    +

    7.12.1 Tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -3559,16 +3569,16 @@ exit 0
       
    -
    -

    7.12.2 Templates

    +
    +

    7.12.2 Templates

      -
    1. xorg configuration
      +
    2. xorg configuration
        -
      1. .Xresources
        +
      2. .Xresources
        xterm*background: Black
        @@ -3591,7 +3601,7 @@ XTerm.vt100.font: 7x13
         
      3. -
      4. .xinitrc
        +
      5. .xinitrc
        #!/bin/bash
        @@ -3603,11 +3613,11 @@ XTerm.vt100.font: 7x13
         
    3. -
    4. openbox
      +
    5. openbox
        -
      1. autostart
        +
      2. autostart
        # forward environment variables to an environment file and the systemd user session
        @@ -3643,7 +3653,7 @@ systemctl --user isolate yavdr-desktop.target
         
      3. -
      4. rc.xml
        +
      5. rc.xml
        <?xml version="1.0" encoding="UTF-8"?>
        @@ -4490,7 +4500,7 @@ systemctl --user isolate yavdr-desktop.target
         
      6. -
      7. rc2.xml
        +
      8. rc2.xml
        <?xml version="1.0" encoding="UTF-8"?>
        @@ -5319,11 +5329,11 @@ systemctl --user isolate yavdr-desktop.target
         
    6. -
    7. Systemd User Session
      +
    8. Systemd User Session
        -
      1. yavdr-desktop.target
        +
      2. yavdr-desktop.target
        [Unit]
        @@ -5336,7 +5346,7 @@ systemctl --user isolate yavdr-desktop.target
         
      3. -
      4. detect-second-display
        +
      5. detect-second-display
        #!/bin/bash
        @@ -5365,7 +5375,7 @@ systemctl --user isolate yavdr-desktop.target
         
      6. -
      7. switch-displays
        +
      8. switch-displays

        This script exchanges the primary and secondary screen. It needs access to the systemd user session. @@ -5384,7 +5394,7 @@ frontend-dbus-send start

  • -
  • openbox-second.service
    +
  • openbox-second.service
    [Unit]
    @@ -5406,7 +5416,7 @@ frontend-dbus-send start
     
  • -
  • osd2web.service
    +
  • osd2web.service
    [Unit]
    @@ -5429,7 +5439,7 @@ frontend-dbus-send start
     
  • -
  • tmux.service
    +
  • tmux.service
    [Unit]
    @@ -5448,7 +5458,7 @@ frontend-dbus-send start
     
  • -
  • wm-exit.service
    +
  • wm-exit.service
    [Unit]
    @@ -5467,7 +5477,7 @@ frontend-dbus-send start
     
  • -
  • irexec
    +
  • irexec

    irexec.service starts irexec for the user session @@ -5500,12 +5510,12 @@ end

  • -
    -

    7.13 samba-install

    +
    +

    7.13 samba-install

    -
    -

    7.13.1 tasks

    +
    +

    7.13.1 tasks

    ---
    @@ -5526,12 +5536,12 @@ end
     
    -
    -

    7.14 samba-config

    +
    +

    7.14 samba-config

    -
    -

    7.14.1 tasks

    +
    +

    7.14.1 tasks

    ---
    @@ -5556,16 +5566,16 @@ end
     
    -
    -

    7.14.2 templates

    +
    +

    7.14.2 templates

      -
    1. smb.conf
      +
    2. smb.conf
        -
      1. global settings
        +
      2. global settings
        {{ ansible_managed | comment }}
        @@ -5652,10 +5662,10 @@ end
         
      3. -
      4. media directories
        +
      5. media directories
        -
        {% for name, path in media_dirs.iteritems() %}
        +
        {% for name, path in media_dirs.items() | list %}
         [{{ name }}]
            path = {{ path }}
            comment = {{ name }} on %h
        @@ -5674,7 +5684,7 @@ end
         
      6. -
      7. include custom samba exports
        +
      8. include custom samba exports
        include = /etc/samba/smb.conf.custom
        @@ -5687,16 +5697,24 @@ end
         
    -
    -

    7.15 STARTED autoinstall-drivers

    +
    +

    7.15 STARTED autoinstall-drivers

    It would be nice to be able to detect if it is suitable to install those drivers:

    -
    -

    7.15.1 TODO sundtek for Sundtek devices (local or network connection)

    +
    +

    7.15.1 TODO sundtek for Sundtek devices (local or network connection)

    +

    +For now we have the role install-sundtek, in the future we could do a little better: +

    + +

    +We should be able to detect local devices by USB-ID: +

    +

    Vendor-IDs:

    @@ -5705,20 +5723,21 @@ Vendor-IDs:
  • 2659:* (neuere Sticks)
  • +
      -
    1. planned packages
      +
    2. planned packages
        -
      • yavdr-hardware-sundtek
      • -
      • python3-sundtek
      • -
      • yavdr-backend-sundtek
      • +
      • yavdr-hardware-sundtek (basic configuration files and scripts, sundtek-avahi-mounter)
      • +
      • python3-sundtek (Python C-extension for sundtek API)
      • +
      • yavdr-backend-sundtek (WFE)
    -
    -

    7.15.2 TODO drivers for TT S2-6400 FF

    +
    +

    7.15.2 TODO drivers for TT S2-6400 FF

    https://github.com/s-moch/linux-saa716x - kann man den relevanten Teil als dkms-Paket bauen? @@ -5726,15 +5745,15 @@ Vendor-IDs:

    -
    -

    7.16 autoinstall-ubuntu-drivers

    +
    +

    7.16 autoinstall-ubuntu-drivers

    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.

    -
    -

    7.16.1 tasks

    +
    +

    7.16.1 tasks

    ---
    @@ -5757,8 +5776,8 @@ The tool ubuntu-drivers is used to install the matching driver version for nvidi
     
    -
    -

    7.17 autoinstall-virtualbox-guest

    +
    +

    7.17 autoinstall-virtualbox-guest

    This role installs the guest additions for virtualbox guests on Ubuntu 18.04 @@ -5807,12 +5826,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04

    -
    -

    7.18 autoinstall-atric-usb

    +
    +

    7.18 autoinstall-atric-usb

    -
    -

    7.18.1 dependencies

    +
    +

    7.18.1 dependencies

    ---
    @@ -5824,8 +5843,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.18.2 tasks

    +
    +

    7.18.2 tasks

    ---
    @@ -5867,8 +5886,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.18.3 templates

    +
    +

    7.18.3 templates

    {{ ansible_managed | comment }}
    @@ -5897,12 +5916,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.19 autoinstall-yausbir

    +
    +

    7.19 autoinstall-yausbir

    -
    -

    7.19.1 dependencies

    +
    +

    7.19.1 dependencies

    ---
    @@ -5913,8 +5932,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.19.2 tasks

    +
    +

    7.19.2 tasks

    ---
    @@ -5956,8 +5975,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.19.3 templates

    +
    +

    7.19.3 templates

    {{ ansible_managed | comment }}
    @@ -5985,15 +6004,15 @@ This role installs the guest additions for virtualbox guests on Ubuntu 18.04
     
    -
    -

    7.20 autoinstall-satip

    +
    +

    7.20 autoinstall-satip

    If a Sat>IP Server responds to a discovery request, the package vdr-plugin-satip is installed.

    -
    -

    7.20.1 tasks

    +
    +

    7.20.1 tasks

    ---
    @@ -6017,12 +6036,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.21 autoinstall-targavfd

    +
    +

    7.21 autoinstall-targavfd

    -
    -

    7.21.1 tasks

    +
    +

    7.21.1 tasks

    ---
    @@ -6038,12 +6057,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.22 autoinstall-imonlcd

    +
    +

    7.22 autoinstall-imonlcd

    -
    -

    7.22.1 tasks

    +
    +

    7.22.1 tasks

    ---
    @@ -6059,12 +6078,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.23 autoinstall-libcecdaemon

    +
    +

    7.23 autoinstall-libcecdaemon

    -
    -

    7.23.1 tasks

    +
    +

    7.23.1 tasks

    ---
    @@ -6080,12 +6099,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.24 autoinstall-pvr350

    +
    +

    7.24 autoinstall-pvr350

    -
    -

    7.24.1 tasks

    +
    +

    7.24.1 tasks

    ---
    @@ -6101,8 +6120,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.25 autoinstall-hauppauge-pvr

    +
    +

    7.25 autoinstall-hauppauge-pvr

    ---
    @@ -6117,12 +6136,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.26 autoinstall-firmware

    +
    +

    7.26 autoinstall-firmware

    -
    -

    7.26.1 dependencies

    +
    +

    7.26.1 dependencies

    ---
    @@ -6133,8 +6152,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.26.2 tasks

    +
    +

    7.26.2 tasks

    ---
    @@ -6175,12 +6194,12 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.27 autoinstall-dvbsky-firmware

    +
    +

    7.27 autoinstall-dvbsky-firmware

    -
    -

    7.27.1 dependencies

    +
    +

    7.27.1 dependencies

    ---
    @@ -6191,8 +6210,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.27.2 defaults

    +
    +

    7.27.2 defaults

    ---
    @@ -6202,8 +6221,8 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.27.3 tasks

    +
    +

    7.27.3 tasks

    ---
    @@ -6253,15 +6272,15 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
     
    -
    -

    7.28 TODO autoinstall-dvbhddevice

    +
    +

    7.28 TODO autoinstall-dvbhddevice

    How to get a driver for the TT-6400 FF card? Needed firmware files are in the yavdr-firmware package.

    -
    -

    7.28.1 dependencies

    +
    +

    7.28.1 dependencies

    ---
    @@ -6272,8 +6291,8 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.28.2 tasks

    +
    +

    7.28.2 tasks

    ---
    @@ -6291,12 +6310,12 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.29 TODO autoinstall-dvbsddevice

    +
    +

    7.29 TODO autoinstall-dvbsddevice

    -
    -

    7.29.1 dependencies

    +
    +

    7.29.1 dependencies

    ---
    @@ -6307,8 +6326,8 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.29.2 tasks

    +
    +

    7.29.2 tasks

    ---
    @@ -6328,12 +6347,12 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.30 autoinstall-hardware-irmp

    +
    +

    7.30 autoinstall-hardware-irmp

    -
    -

    7.30.1 dependencies

    +
    +

    7.30.1 dependencies

    ---
    @@ -6344,8 +6363,8 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.30.2 tasks

    +
    +

    7.30.2 tasks

    ---
    @@ -6361,19 +6380,19 @@ How to get a driver for the TT-6400 FF card? Needed firmware files are in the 
     
    -
    -

    7.31 Serial IR Receivers

    +
    +

    7.31 Serial IR Receivers

    This role preconfigures the system for serial „homebrew“ receivers. Newer kernel versions provide serial_ir which acts as a rc-core driver, so we don’t need lircd - eventlircd can use the device directly.

    -As configured in the role yavdr-remote (/etc/rc_maps.cfg) a keytable for a RC-6 MCE remote is loaded by default. You can choose a different keymap which may also use another ir-protocol. +As configured in the role yavdr-remote (/etc/rc_maps.cfg) a keytable for a RC-6 MCE remote is loaded by default. You can choose a different keymap which may also use another ir-protocol.

    -
    -

    7.31.1 defaults

    +
    +

    7.31.1 defaults

    --- 
    @@ -6384,8 +6403,8 @@ As configured in the role yavdr-remote (/etc/rc_maps.cfg
     
    -
    -

    7.31.2 tasks

    +
    +

    7.31.2 tasks

    -
    -

    7.31.3 templates

    +
    +

    7.31.3 templates

      -
    1. load serial_ir on startup
      +
    2. load serial_ir on startup
      {{ ansible_managed | comment }}
      @@ -6428,7 +6447,7 @@ serial_ir
       
    3. -
    4. serial_ir module options
      +
    5. serial_ir module options
      {{ ansible_managed | comment }}
      @@ -6447,7 +6466,7 @@ install serial_ir setserial /dev/{{setserial options
      +
    6. setserial options
      {{ ansible_managed | comment }}
      @@ -6466,21 +6485,21 @@ install serial_ir setserial /dev/{{
      -

      7.32 kodi

      +
      +

      7.32 kodi

      -
      -

      7.32.1 tasks

      +
      +

      7.32.1 tasks

        -
      1. Install KODI
        +
      2. Install KODI
          -
        • main.yml
          -
          +
        • main.yml
          +
          - import_tasks: install-kodi.yml
             tags:
          @@ -6496,7 +6515,7 @@ install serial_ir setserial /dev/{{install-kodi.yml
          +
        • install-kodi.yml
          ---
          @@ -6528,7 +6547,7 @@ install serial_ir setserial /dev/{{configure-kodi.yml
          +
        • configure-kodi.yml
          - name: create kodi.service for the user session
          @@ -6582,12 +6601,12 @@ install serial_ir setserial /dev/{{
          -

          7.32.2 templates

          +
          +

          7.32.2 templates

            -
          1. kodi.service
            +
          2. kodi.service

            This systemd unit for the user session starts (and stops) kodi. @@ -6609,7 +6628,7 @@ This systemd unit for the user session starts (and stops) kodi.

        • -
        • set-kodi-diplay
          +
        • set-kodi-diplay

          This is a version-dependent script to force KODI to use the display set by the environment variable DISPLAY. The following Version is intended for KODI 18. @@ -6738,15 +6757,15 @@ This is a version-dependent script to force KODI to use the display set by the e

      -
      -

      7.32.3 files

      +
      +

      7.32.3 files

      Those configuration files provide a preconfiguration for kodi which overrides the system wide configuration

        -
      1. Lircmap.xml
        +
      2. Lircmap.xml

        This file allows to map keys sent by remotes via eventlircd (which uses the name devinput) to kodi key names. @@ -6817,14 +6836,14 @@ This file allows to map keys sent by remotes via eventlircd (which uses the name

    7. -
    8. keymaps
      +
    9. keymaps

      This file maps the keys defined in Lircmap.xml to actions within kodi.

        -
      1. remote.xml
        +
      2. remote.xml
        <?xml version="1.0" encoding="UTF-8"?>
        @@ -7376,17 +7395,17 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
         
    10. -
      -

      7.33 dvd

      +
      +

      7.33 dvd

      -
      -

      7.33.1 tasks

      +
      +

      7.33.1 tasks

        -
      • install libdvd-pkg, allow programs to eject optical media
        -
        +
      • install libdvd-pkg, allow programs to eject optical media
        +
        ---
         # file: roles/dvd/tasks/main.yml
        @@ -7402,16 +7421,13 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
             state: present
             install_recommends: no
         
        -- name: configure package libdvd-pkg
        -  debconf:
        -    name: 'libdvd-pkg'
        -    question: '{{ item }}'
        -    vtype: boolean
        -    value: true
        -  with_items:
        -      - 'libdvd-pkg/post-invoke_hook-install'
        -      - 'libdvd-pkg/build boolean'
        -  notify: ['Reconfigure unattended upgrades with dpkg']
        +- name: reconfigure libdvd-pkg
        +  dpkg_reconfigure:
        +    pkg: libdvd-pkg
        +    answers:
        +     libdvd-pkg/post-invoke_hook-install: boolean true
        +     libdvd-pkg/build: boolean true
        +
         
         - name: change udev rule to allow KODI to eject optical disks
           shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules
        @@ -7425,31 +7441,327 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
         
      -
      -

      7.34 install-sundtek

      + +
      +

      7.34 vdr-epg-daemon

      +

      +This role installs the vdr-epg-daemon +

      -
      -

      7.34.1 variables

      +
      +

      7.34.1 defaults

      +
      +
      ---
      +# file: roles/epgd/defaults/main.yml
      +
      +epgd_dbhost: localhost
      +epgd_dbport: 3306
      +epgd_dbname: epg2vdr
      +epgd_dbuser: epg2vdr
      +epgd_dbpass: epg
      +epgd_epgview: eventsview.sql
      +epgd_epgviewweb: eventsviewplain.sql
      +epgd_thetvdbview: thetvdbview.sql
      +epgd_checkinitial: 1
      +epgd_daysinadvance: 8
      +epgd_daystoupdate: 4
      +epgd_updatetime: 12
      +epgd_updatethreshold: 500
      +epgd_xmlstoretofs: 0
      +epgd_getepgimages: 1
      +# EpgImageSize
      +# 0 = 174x130
      +# 1 = 329x245
      +# 2 = 525x400
      +epgd_epgimagesize: 2
      +epgd_maximagesperevent: 1
      +epgd_seriesenabled: 1
      +epgd_seriesport: 2006
      +epgd_seriesstoretofs: 0
      +epgd_seriesurl: www.eplists.de
      +epgd_scrapepg: 1
      +epgd_scrapRecordings: 1
      +#epgd_scrapmoviedbapikey: ""
      +epgd_cachepath: /var/cache/epgd/
      +epgd_epghttpd_port: 9999
      +#epgd_httpproxy: 127.0.0.1:8000
      +epgd_httpproxy_username: ""
      +epgd_httpproxy_password: ""
      +epgd_LogLevel: 1
      +epgd_epgdata_url: http://www.epgdata.com
      +epgd_epgdata_pin: insert-your-pin-here
      +epgd_epgdata_timeout: 180
      +
      -
      -

      7.34.2 tasks

      +
      + +
      +

      7.34.2 tasks

      +
      #Installing mariadb, epg-daemon and epg2vdr.
      +#bind-address is set to 0.0.0.0 --> 99-epgd.cnf.
      +#The root SQL password is only stored (NONE), because the epgd-tool
      +#is expecting it. But it is not really used,
      +#because the connection is established via a socket without a password.
      +#Normal users must use sudo if they want to access mysql as root.
      +#TODO:
      +    # - Create channelmap if channels.conf is present.
      +    #   (the script already exists at mld.)
      +    # - because skindesigner-logos delivers only svg-logos, logoSuffix svg should be the preset --> vdr-epg-daemon / lib / parameters.c
      +    # - customize epgd-tool for mariadb
      +
      +
      +- name: MariaDB and Plugin | install
      +  apt:
      +    name: ['mariadb-server', 'mariadb-plugin-epglv', 'python-pymysql']
      +    state: present
      +    
      +- name: copy file | epgd mariadb config
      +  template:
      +    src: templates/etc_mysql_mariadb.conf.d_99-epgd.cnf.j2
      +    dest: /etc/mysql/mariadb.conf.d/99-epgd.cnf
      +    owner: root
      +    group: root
      +
      +- name: create /root/.ssh if it doesn't exist yes
      +  file:
      +    path: /root/.ssh
      +    state: directory
      +    owner: root
      +    group: root
      +    mode: 0700
      +    
      +- name: copy file | mysqlpasswd
      +  template:
      +    src: templates/root_.ssh_mysqlpasswd.j2
      +    dest: /root/.ssh/mysqlpasswd
      +    owner: root
      +    group: root
      +    mode: 0600
      +    backup: yes
      +
      +- name: Restart mariadb
      +  systemd:
      +    name: mariadb.service
      +    state: restarted
      +    enabled: yes
      +    masked: no
      +    
      +- name: Create a new database for epgd
      +  mysql_db:
      +    name: "{{ epgd_dbname }}"
      +    state: present
      +    login_unix_socket: /var/run/mysqld/mysqld.sock
      +    
      +- name: Create User for epgd database  
      +  mysql_user:
      +    name: "{{ epgd_dbuser }}"
      +    password: "{{ epgd_dbpass }}"
      +    host: '%'
      +    priv: '{{ epgd_dbname }}.*:ALL'
      +    state: present
      +    login_unix_socket: /var/run/mysqld/mysqld.sock
      +
      +- name: Create User for epgd database  
      +  mysql_user:
      +    name: "{{ epgd_dbuser }}"
      +    password: "{{ epgd_dbpass }}"
      +    host: 'localhost'
      +    priv: '{{ epgd_dbname }}.*:ALL'
      +    state: present
      +    login_unix_socket: /var/run/mysqld/mysqld.sock
      +
      +- name: create epgd config folder
      +  file:
      +   path: /etc/epgd
      +   state: directory
      +
      +- name: epgd config
      +  template:
      +    src: templates/etc_epgd_epgd.conf.j2
      +    dest: /etc/epgd/epgd.conf
      +
      +- name: epgd | install
      +  apt:
      +    name: ['vdr-epg-daemon', 'vdr-plugin-epg2vdr', 'skindesigner-logos']
      +    state: present
      +
      +#- name: epgd | start
      +  #systemd:
      +    #name: epgd_service
      +    #state: started
      +    #enabled: yes
      +    #masked: no
      +
      +
      +
      +
      + +
      +

      7.34.3 templates

      +
      +
      +
      {{ ansible_managed | comment }}
      +[mysqld]
      +bind-address            = 0.0.0.0
      +
      +
      +
      +
      {{ ansible_managed | comment }}
      +PASSWORD=NONE 
      +
      +
      +
      +
      {{ ansible_managed | comment }}
      +# ------------------------------------
      +# Configuration of EPG Daemon
      +# ------------------------------------
      +
      +DbHost = {{ epgd_dbhost }}
      +DbPort = {{ epgd_dbport }}
      +DbName = {{ epgd_dbname }}
      +DbUser = {{ epgd_dbuser }}
      +DbPass = {{ epgd_dbpass }}
      +
      +EpgView = {{ epgd_epgview }}
      +EpgViewWeb = {{ epgd_epgviewweb }}
      +TheTvDBView = {{ epgd_thetvdbview }}
      +
      +CheckInitial = {{ epgd_checkinitial }}
      +DaysInAdvance = {{ epgd_daysinadvance }}
      +DaysToUpdate = {{ epgd_daystoupdate }}
      +UpdateTime = {{ epgd_updatetime }}
      +UpdateThreshold = {{ epgd_updatethreshold }}
      +
      +XmlStoreToFs = {{ epgd_xmlstoretofs }}
      +
      +GetEPGImages = {{ epgd_getepgimages }}
      +# EpgImageSize
      +# 0 = 174x130
      +# 1 = 329x245
      +# 2 = 525x400
      +EpgImageSize = {{ epgd_epgimagesize }}
      +MaxImagesPerEvent = {{ epgd_maximagesperevent }}
      +
      +SeriesEnabled = {{ epgd_seriesenabled }}
      +SeriesPort = {{ epgd_seriesport }}
      +SeriesStoreToFs = {{ epgd_seriesstoretofs }}
      +SeriesUrl = {{ epgd_seriesurl }}
      +
      +ScrapEpg = {{ epgd_scrapepg }}
      +ScrapRecordings = {{ epgd_scrapRecordings }}
      +{% if epgd_scrapmoviedbapikey is defined %}
      +ScapMovieDbApiKey = {{ epgd_scrapmoviedbapikey }}
      +{% else %}
      +#ScrapMovieDbApiKey =
      +{% endif %}
      +
      +{% if epgd_netdevice is defined %}
      +NetDevice = {{ epgd_netdevice }}
      +{% else %}
      +# NetDevice = eth0
      +{% endif %}
      +
      +CachePath = {{ epgd_cachepath }}
      +HttpPort = {{ epgd_epghttpd_port }}
      +
      +{% if epgd_httpproxy is defined %}
      +HttpProxy = {{ epgd_httpproxy }}
      +UserName = {{ epgd_httpproxy_username }}
      +Password = {{ epgd_httpproxy_password }}
      +{% else %}
      +# HttpProxy = 127.0.0.1:8000
      +# UserName =
      +# Password =
      +{% endif %}
      +
      +LogLevel = {{ epgd_LogLevel }}
      +
      +# ---------------
      +# epgdata plugin
      +# ---------------
      +
      +epgdata.url = {{ epgd_epgdata_url }}
      +epgdata.pin = {{ epgd_epgdata_pin }} 
      +
      +# Download timeout in seconds (default 180)
      +epgdata.timeout = {{ epgd_epgdata_timeout }}
      +
      +
      +
      +
      +
      + +
      +

      7.35 install-sundtek

      +
      +
      +
      +

      7.35.1 dependencies

      +
      +
      +
      ---
      +dependencies:
      +  - { role: collect-facts }
      +
      +
      +
      +
      +
      +
      +

      7.35.2 defaults

      +
      +
      +
      --- 
      +# file: roles/install-sundtek/defaults/main.yml
      +
      +sundtek:
      +  install: auto
      +  wait_for_devices: true
      +  wait_for_network: false
      +
      +
      +
      +
      + +
      +

      7.35.3 tasks

      +
      +
      ---
       # file roles/install-sundtek/tasks/main.yml
       
      -- name: apt | install yavdr-hardware-sundtek
      -  apt:
      -    name: yavdr-hardware-sundtek
      +# TODO: include LD_PRELOAD and other dependencies in yavdr-hardware-sundtek package
      +#- name: apt | install yavdr-hardware-sundtek
      +#  apt:
      +#    name: yavdr-hardware-sundtek
      +
      +- name: expand template for custom sundtek.service
      +  template:
      +    src: templates/systemd/sundtek.service.j2
      +    dest: /etc/systemd/systemd/sundtek.service
      +  when: sundtek.install
      +
      +- name: apt | install sundtek dvb driver
      +  apt:
      +    name: dvb-driver-sundtek
      +    state: present
      +  when: sundtek.install
      +# TODO: state should depend on sundtek.install:
      +# '{{ "present" if sundtek.install else "absent" }}'
      +
      +- name: apt | install vdr-plugins for dynamic sundtek configuration else uninstall
      +  apt:
      +    name:
      +      - vdr-plugin-dynamite
      +      - vdr-plugin-sundtek
      +    state: '{{ "absent" if sundtek.wait_for_devices else "present" }}'
      +  when: sundtek.install
       
      -# TODO: include LD_PRELOAD in yavdr-hardware-sundtek!
      -#- name: set LD_PRELOAD for sundtek driver to VDR's environment
      -#  file:
      -#    src: files/sundtek_LD_PRELOAD.conf
      -#    dest: /etc/systemd/system/vdr.service.d/sundtek_LD_PRELOAD.conf
       
       - name: systemd | start sundtek.service
         systemd:
      @@ -7458,57 +7770,76 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
           enabled: yes
           masked: no
           daemon-reload: yes
      +  when: sundtek.install
       
      -- name: detect local and remote sundtek devices
      -  command: scansundtek
      -  register: sundtek_scan
      +# TODO: Scan for local and remote sundtek sticks and create
      +#       /etc/sundtek.conf - needs yavdr-hardware-sundtek
      +#- name: detect local and remote sundtek devices
      +#  command: scansundtek
      +#  register: sundtek_scan
      +# 
      +# - name: set variable sundtek_scan
      +#   set_fact:
      +#     sundtek_devices: "{{ sundtek_scan.stdout | from_json }}"
      +#
      +#- name: create /etc/sundtek.conf
      +#  template:
      +#    src: templates/sundtek.conf.j2
      +#    dest: /etc/sundtek.conf
      +#  notify: Restart sundtek.service
       
      -- name: set variable sundtek_scan
      -  set_fact:
      -    sundtek_devices: "{{ sundtek_scan.stdout | from_json }}"
      -
      -- name: create /etc/sundtek.conf
      +- name: set LD_PRELOAD for sundtek driver to VDR's environment
         template:
      -    src: templates/sundtek.conf.j2
      -    dest: /etc/sundtek.conf
      -  notify: Restart sundtek.service
      +    src: templates/systemd/vdr.service.d/sundtek.conf.j2
      +    dest: /etc/systemd/system/vdr.service.d/sundtek_LD_PRELOAD.conf
      +  notify: ['Restart VDR']
       
      -- name: systemd | start sundtek-avahi-mounter.service
      -  systemd:
      -    name: sundtek-avahi-mounter.service
      -    state: started
      -    masked: no
      -    enabled: yes
      -    daemon-reload: yes
      +# TODO: enable sundtek-avahi-mounter (needs to be ported to python3 and 
      +#       work indenpendently of yavdrhw.db files)
      +#- name: systemd | start sundtek-avahi-mounter.service
      +#  systemd:
      +#    name: sundtek-avahi-mounter.service
      +#    state: started
      +#    masked: no
      +#    enabled: yes
      +#    daemon-reload: yes
       
      -
      -

      7.34.3 templates

      -
      +
      +

      7.35.4 templates

      +
        -
      1. Overrides for systemd unit sundtek.service
        -
        -
          -
        • [ ] wait for network
        • -
        • [X] wait for local devices (see sundtek.service)
        • -
        +
      2. LD_PRELOAD for vdr.service
        +
        +
        +
        {{ ansible_managed | comment }}
        +
        +{% if sundtek.install %}
        +[Service]
        +Environment=LD_PRELOAD=/opt/lib/libmediaclient.so
        +{% endif %}
        +
        +
      3. -
      4. /etc/systemd/system/sundtek.service
        -
        + +
      5. /etc/systemd/system/sundtek.service
        +
        {{ ansible_managed | comment }}
         
         [Unit]
         Description=Sundtek mediasrv
        +{% if sundtek.wait_for_network %}
         After=network-online.target
        +{% endif %}
         Before=vdr.service
         [Service]
         Type=forking
        -ExecStart=/opt/bin/mediasrv -d --pluginpath=/opt/bin --wait-for-devices
        +ExecStart=/opt/bin/mediasrv -d --pluginpath=/opt/bin {% if sundtek.wait_for_devices %}--wait-for-devices{% endif%}
         ExecStop=/opt/bin/mediaclient --shutdown
         Restart=on-failure
         [Install]
        @@ -7518,8 +7849,8 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
         
      6. -
      7. /etc/sundtek.conf
        -
        +
      8. /etc/sundtek.conf
        +
        # ----- GLOBAL SECTION -----
         #Set loglevel for logging to /var/log/mediasrv.log
        @@ -7583,6 +7914,7 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
         device_detach=/usr/bin/sundtek_detach
         
         
        +{% if sundtek_devices is definded %}
         {% for device in sundtek_devices.local %}
         {% if device.serial is defined %}
         [{{ device.serial }}]
        @@ -7619,6 +7951,7 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
         
         {% endif %}
         {% endfor %}
        +{% endif %}
         
        @@ -7626,9 +7959,9 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
      -
      -

      7.35 template-test

      -
      +
      +

      7.36 template-test

      +
      ---
       
      @@ -7868,13 +8201,13 @@ EndSection
       
      -
      -

      7.36 wakeup

      -
      +
      +

      7.37 wakeup

      +
      -
      -

      7.36.1 defaults

      -
      +
      +

      7.37.1 defaults

      +
      ---
       # file roles/wakeup/defaults/main.yml
      @@ -7883,9 +8216,9 @@ EndSection
       
      -
      -

      7.36.2 tasks

      -
      +
      +

      7.37.2 tasks

      +
      ---
       # file roles/wakeup/tasks/main.yml
      @@ -7905,9 +8238,9 @@ EndSection
       
      -
      -

      7.36.3 templates

      -
      +
      +

      7.37.3 templates

      +
      {{ ansible_managed | comment }}
       
      @@ -7932,13 +8265,13 @@ ACPI_START_AHEAD=5
       
      -
      -

      7.37 grub-config

      -
      +
      +

      7.38 grub-config

      +
      -
      -

      7.37.1 default variables

      -
      +
      +

      7.38.1 default variables

      +
      system:
         shutdown: poweroff
      @@ -7949,9 +8282,9 @@ ACPI_START_AHEAD=5
       
      -
      -

      7.37.2 tasks

      -
      +
      +

      7.38.2 tasks

      +
      ---
       
      @@ -7975,9 +8308,9 @@ ACPI_START_AHEAD=5
       
      -
      -

      7.37.3 templates

      -
      +
      +

      7.38.3 templates

      +
      #!/bin/sh
       {{ ansible_managed | comment }}
      @@ -7999,9 +8332,9 @@ fi
       
      -
      -

      7.37.4 handlers

      -
      +
      +

      7.38.4 handlers

      +
      ---
       
      @@ -8023,15 +8356,15 @@ fi
       
      -
      -

      8 Modules

      +
      +

      8 Modules

      This section contains custom modules for the yaVDR Playbooks. They are used to collect facts about the system and configure applications and daemons.

      -
      -

      8.1 hardware_facts.py

      +
      +

      8.1 hardware_facts.py

      # This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules.
      @@ -8209,8 +8542,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
       
      -
      -

      8.2 pci_facts.py

      +
      +

      8.2 pci_facts.py

      @@ -8286,8 +8619,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
       
      -
      -

      8.3 satip_facts.py

      +
      +

      8.3 satip_facts.py

      DOCUMENTATION = '''
      @@ -8411,8 +8744,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
       
      -
      -

      8.4 xrandr_facts.py

      +
      +

      8.4 xrandr_facts.py

      • [ ] support multiple screens (-d :0.0 .. :0.n)
      • @@ -8817,8 +9150,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
      -
      -

      9 Handlers

      +
      +

      9 Handlers

      - name: Reconfigure unattended upgrades with dpkg
      @@ -8911,7 +9244,7 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
       

      Autor: Alexander Grothe <seahawk1986@gmx.de>

      -

      Created: 2019-02-22 Fr 15:44

      +

      Created: 2019-03-10 So 20:35

      Validate

      diff --git a/Manual.org b/Manual.org index 2763144..4025d32 100644 --- a/Manual.org +++ b/Manual.org @@ -727,6 +727,7 @@ yavdr-common executes the following tasks: - debconf-utils - linux-firmware - psmisc + - python-jmespath - python-kmodpy - python-requests - python-usb @@ -5365,16 +5366,22 @@ It would be nice to be able to detect if it is suitable to install those drivers :PROPERTIES: :ID: 8b66ce8d-0095-4fbd-8868-8bc5c43d19fc :END: + +For now we have the role ~install-sundtek~, in the future we could do a little better: + +We should be able to detect local devices by USB-ID: + Vendor-IDs: - eb1a:5[1b2] (alte Generation) - 2659:* (neuere Sticks) + **** planned packages :PROPERTIES: :ID: f5970635-da3e-4929-a17c-3226b69497c5 :END: -- yavdr-hardware-sundtek -- python3-sundtek -- yavdr-backend-sundtek +- yavdr-hardware-sundtek (basic configuration files and scripts, sundtek-avahi-mounter) +- python3-sundtek (Python C-extension for sundtek API) +- yavdr-backend-sundtek (WFE) *** TODO drivers for TT S2-6400 FF :PROPERTIES: :ID: 257ce3b7-ecfc-4e13-b394-f3b0707be30a @@ -6052,7 +6059,7 @@ This role installs the vdr-epg-daemon #+include: roles/epgd/tasks/main.yml src yml *** templates -#+include: roles/epgd/templates/etc_mysql_mardiadb.conf.d_99-epgd.cnf.j2 src jinja2 +#+include: roles/epgd/templates/etc_mysql_mariadb.conf.d_99-epgd.cnf.j2 src jinja2 #+include: roles/epgd/templates/root_.ssh_mysqlpasswd.j2 src jinja2 #+include: roles/epgd/templates/etc_epgd_epgd.conf.j2 src jinja2 @@ -6086,15 +6093,33 @@ sundtek: --- # file roles/install-sundtek/tasks/main.yml -- name: apt | install yavdr-hardware-sundtek - apt: - name: yavdr-hardware-sundtek +# TODO: include LD_PRELOAD and other dependencies in yavdr-hardware-sundtek package +#- name: apt | install yavdr-hardware-sundtek +# apt: +# name: yavdr-hardware-sundtek + +- name: expand template for custom sundtek.service + template: + src: templates/systemd/sundtek.service.j2 + dest: /etc/systemd/systemd/sundtek.service + when: sundtek.install + +- name: apt | install sundtek dvb driver + apt: + name: dvb-driver-sundtek + state: present + when: sundtek.install +# TODO: state should depend on sundtek.install: +# '{{ "present" if sundtek.install else "absent" }}' + +- name: apt | install vdr-plugins for dynamic sundtek configuration else uninstall + apt: + name: + - vdr-plugin-dynamite + - vdr-plugin-sundtek + state: '{{ "absent" if sundtek.wait_for_devices else "present" }}' + when: sundtek.install -# TODO: include LD_PRELOAD in yavdr-hardware-sundtek! -#- name: set LD_PRELOAD for sundtek driver to VDR's environment -# file: -# src: files/sundtek_LD_PRELOAD.conf -# dest: /etc/systemd/system/vdr.service.d/sundtek_LD_PRELOAD.conf - name: systemd | start sundtek.service systemd: @@ -6103,47 +6128,67 @@ sundtek: enabled: yes masked: no daemon-reload: yes + when: sundtek.install -- name: detect local and remote sundtek devices - command: scansundtek - register: sundtek_scan +# TODO: Scan for local and remote sundtek sticks and create +# /etc/sundtek.conf - needs yavdr-hardware-sundtek +#- name: detect local and remote sundtek devices +# command: scansundtek +# register: sundtek_scan +# +# - name: set variable sundtek_scan +# set_fact: +# sundtek_devices: "{{ sundtek_scan.stdout | from_json }}" +# +#- name: create /etc/sundtek.conf +# template: +# src: templates/sundtek.conf.j2 +# dest: /etc/sundtek.conf +# notify: Restart sundtek.service -- name: set variable sundtek_scan - set_fact: - sundtek_devices: "{{ sundtek_scan.stdout | from_json }}" - -- name: create /etc/sundtek.conf +- name: set LD_PRELOAD for sundtek driver to VDR's environment template: - src: templates/sundtek.conf.j2 - dest: /etc/sundtek.conf - notify: Restart sundtek.service + src: templates/systemd/vdr.service.d/sundtek.conf.j2 + dest: /etc/systemd/system/vdr.service.d/sundtek_LD_PRELOAD.conf + notify: ['Restart VDR'] -- name: systemd | start sundtek-avahi-mounter.service - systemd: - name: sundtek-avahi-mounter.service - state: started - masked: no - enabled: yes - daemon-reload: yes +# TODO: enable sundtek-avahi-mounter (needs to be ported to python3 and +# work indenpendently of yavdrhw.db files) +#- name: systemd | start sundtek-avahi-mounter.service +# systemd: +# name: sundtek-avahi-mounter.service +# state: started +# masked: no +# enabled: yes +# daemon-reload: yes #+END_SRC *** templates :PROPERTIES: :ID: 30011bae-7869-4928-b8ea-b66034badf9e :END: -**** Overrides for systemd unit sundtek.service -- [ ] wait for network -- [X] wait for local devices (see sundtek.service) +**** LD_PRELOAD for vdr.service +#+BEGIN_SRC systemd :tangle roles/install-sundtek/templates/systemd/vdr.service.d/sundtek.conf.j2 +{{ ansible_managed | comment }} + +{% if sundtek.install %} +[Service] +Environment=LD_PRELOAD=/opt/lib/libmediaclient.so +{% endif %} +#+END_SRC + **** /etc/systemd/system/sundtek.service -#+BEGIN_SRC systemd :tangle roles/sundtek/systemd/sundtek.service.j2 +#+BEGIN_SRC systemd :tangle roles/install-sundtek/templates/systemd/sundtek.service.j2 {{ ansible_managed | comment }} [Unit] Description=Sundtek mediasrv +{% if sundtek.wait_for_network %} After=network-online.target +{% endif %} Before=vdr.service [Service] Type=forking -ExecStart=/opt/bin/mediasrv -d --pluginpath=/opt/bin --wait-for-devices +ExecStart=/opt/bin/mediasrv -d --pluginpath=/opt/bin {% if sundtek.wait_for_devices %}--wait-for-devices{% endif%} ExecStop=/opt/bin/mediaclient --shutdown Restart=on-failure [Install] @@ -6217,6 +6262,7 @@ device_attach=/usr/bin/sundtek_attach device_detach=/usr/bin/sundtek_detach +{% if sundtek_devices is definded %} {% for device in sundtek_devices.local %} {% if device.serial is defined %} [{{ device.serial }}] @@ -6253,6 +6299,7 @@ disable_analogtv=1 #disable initialization {% endif %} {% endfor %} +{% endif %} #+END_SRC ** template-test :PROPERTIES: diff --git a/roles/yavdr-common/tasks/configure_system.yml b/roles/yavdr-common/tasks/configure_system.yml index 2cb9be0..caf56b6 100644 --- a/roles/yavdr-common/tasks/configure_system.yml +++ b/roles/yavdr-common/tasks/configure_system.yml @@ -40,6 +40,7 @@ - debconf-utils - linux-firmware - psmisc + - python-jmespath - python-kmodpy - python-requests - python-usb