diff --git a/Manual.html b/Manual.html index 228d8a9..ea3d22b 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 @@ -240,255 +240,262 @@ 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. @@ -521,22 +528,22 @@ 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 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. @@ -571,8 +578,8 @@ We use a callback to generate tags for all roles autmatically:

-
-

3.1 Install script for local usage

+
+

3.1 Install script for local usage

if (( $EUID != 0 )); then
@@ -595,12 +602,12 @@ ansible-playbook yavdr07.yml -b -i 'localhost_inventory
 
-
-

4 Playbooks

+
+

4 Playbooks

-
-

4.1 yavdr07.yml

+
+

4.1 yavdr07.yml

The yavdr07.yml playbook sets up a fully-featured yaVDR installation: @@ -651,8 +658,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 @@ -685,8 +692,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: @@ -700,12 +707,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

---
@@ -723,8 +730,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
@@ -751,8 +758,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
@@ -767,8 +774,8 @@ This playbook can either be used to run the installation on the localhost or any
 
-
-

6.4 NFS

+
+

6.4 NFS

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

6.5 Samba

+
+

6.5 Samba

samba:
@@ -788,8 +795,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
@@ -805,8 +812,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
@@ -821,20 +828,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
    ---
    @@ -854,19 +861,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-387 from ppa:graphics-drivers/ppa

    -
    -

    7.2.1 tasks

    +
    +

    7.2.1 tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -896,15 +903,15 @@ install nvidia-387 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. @@ -917,7 +924,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. @@ -934,7 +941,7 @@ You can set a list of package repositories which provide the necessary packages.

  3. -
  4. Drivers
    +
  5. 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. @@ -947,7 +954,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 @@ -961,7 +968,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. @@ -994,15 +1001,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
      ---
      @@ -1018,7 +1025,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: @@ -1035,7 +1042,7 @@ This task prevents apt to automatically install all recommended dependencies for

    -
  • Set up package repositories
    +
  • Set up package repositories
    - name: add PPAs
    @@ -1055,7 +1062,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
    @@ -1067,10 +1074,10 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • create user vdr
  • -
  • Disable release-upgrade notifications
    +
  • create user vdr
  • +
  • Disable release-upgrade notifications
      -
    1. SOMEDAY move from lineinfile to template
      +
    2. SOMEDAY move from lineinfile to template
      - name: disable release-upgrade notifications
      @@ -1092,7 +1099,7 @@ This task prevents apt to automatically install all recommended dependencies for
       
  • -
  • Install essential packages
    +
  • Install essential packages
    - name: apt | install basic packages
    @@ -1124,7 +1131,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
    @@ -1138,13 +1145,13 @@ This task prevents apt to automatically install all recommended dependencies for
     
  • -
  • create directories
  • +
  • create directories
  • -
    -

    7.3.3 templates

    +
    +

    7.3.3 templates

    {{ ansible_managed | comment('c') }}
    @@ -1156,12 +1163,12 @@ APT::Install-Suggests "0";
     
    -
    -

    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
    @@ -1169,12 +1176,12 @@ APT::Install-Suggests "0";
     
    -
    -

    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
      @@ -1214,16 +1221,16 @@ APT::Install-Suggests "0";
       
    -
    -

    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
      ---
      @@ -1242,7 +1249,7 @@ APT::Install-Suggests "0";
       
    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
      @@ -1257,7 +1264,7 @@ APT::Install-Suggests "0";
       
    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
      @@ -1292,7 +1299,7 @@ APT::Install-Suggests "0";
       
    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 @@ -1310,7 +1317,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
    @@ -1341,7 +1348,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
    @@ -1362,8 +1369,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 @@ -1375,12 +1382,12 @@ Start after network-online.target

    -
    -

    7.5.3 files

    +
    +

    7.5.3 files

      -
    1. remote.conf
      +
    2. remote.conf
      LIRC.Up KEY_UP
      @@ -1515,7 +1522,7 @@ XKeySym.Next       XF86AudioNext
       
    3. -
    4. keymacros.conf
      +
    5. keymacros.conf
      # Remote control key macros for VDR
      @@ -1541,12 +1548,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
    @@ -1554,8 +1561,8 @@ User0     @osdteletext
     
    -
    -

    7.6.2 tasks

    +
    +

    7.6.2 tasks

    ---
    @@ -1625,15 +1632,15 @@ User0     @osdteletext
     
    -
    -

    7.7 nfs-server

    +
    +

    7.7 nfs-server

    -
    -

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

    +
    +

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

    -
    -

    7.7.2 tasks

    +
    +

    7.7.2 tasks

    ---
    @@ -1662,12 +1669,12 @@ User0     @osdteletext
     
    -
    -

    7.7.3 templates

    +
    +

    7.7.3 templates

      -
    1. /etc/exports
      +
    2. /etc/exports
      /srv *(rw,fsid=0,sync,no_subtree_check,all_squash,anongid={{ vdr.gid }},anonuid={{ vdr.uid }})
      @@ -1678,7 +1685,7 @@ User0     @osdteletext
       
    3. -
    4. avahi services
      +
    5. avahi services
      <?xml version="1.0" standalone='no'?>
      @@ -1699,12 +1706,12 @@ User0     @osdteletext
       
    -
    -

    7.8 STARTED yavdr-remote

    +
    +

    7.8 STARTED yavdr-remote

    -
    -

    7.8.1 default variables

    +
    +

    7.8.1 default variables

    lircd0_socket: /var/run/lirc/lircd0
    @@ -1712,8 +1719,8 @@ User0     @osdteletext
     
    -
    -

    7.8.2 tasks

    +
    +

    7.8.2 tasks

    ---
    @@ -1763,7 +1770,7 @@ User0     @osdteletext
       template:
         src: templates/03-vdr-lirc.conf.j2
         dest: /etc/vdr/conf.d/03-vdr-lirc.conf
    -  notify: ['Restart VDR']
    +  notify: ['Restart VDR']
       tags:
         - config
     
    @@ -1771,19 +1778,19 @@ User0     @osdteletext
       template:
         src: templates/rc_maps.cfg.j2
         dest: /etc/rc_maps.cfg
    -  notify: ['Trigger Udev']
    +  notify: ['Trigger Udev']
       tags:
         - config
     
    -
    -

    7.8.3 templates

    +
    +

    7.8.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' %}
      @@ -1794,7 +1801,7 @@ User0     @osdteletext
       
    3. -
    4. Systemd Drop-in to start lircd2uinput with lircd
      +
    5. Systemd Drop-in to start lircd2uinput with lircd
      [Service]
      @@ -1804,7 +1811,7 @@ User0     @osdteletext
       
    6. -
    7. create /etc/rc_maps.cfg
      +
    8. create /etc/rc_maps.cfg
      #
      @@ -1995,17 +2002,17 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
       
    -
    -

    7.8.4 files

    +
    +

    7.8.4 files

    -
    -

    7.9 pulseaudio

    +
    +

    7.9 pulseaudio

    -
    -

    7.9.1 tasks

    +
    +

    7.9.1 tasks

    ---
    @@ -2028,8 +2035,8 @@ ati_remote    rc-medion-x10-digitainer   /lib/udev/rc_keymaps/rc-medion-x10-digi
     
    -
    -

    7.9.2 templates

    +
    +

    7.9.2 templates

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

    7.10 yavdr-xorg

    +
    +

    7.10 yavdr-xorg

    -
    -

    7.10.1 About the GUI session

    +
    +

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

    -
    -

    7.10.2 default variables

    +
    +

    7.10.2 default variables

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

    7.10.3 tasks

    +
    +

    7.10.3 tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -2112,7 +2119,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    3. -
    4. setup-xorg.yml
      +
    5. setup-xorg.yml
      ---
      @@ -2158,6 +2165,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
           line: '{{ item }}'
         with_items:
             - '-D'
      +      - '-w alsa-driver-broken'
             # - '-a pulse' # do we need this with our existing asound.conf?
       
       - name: add a login shell for the user vdr
      @@ -2222,7 +2230,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
       
    6. -
    7. detect-xorg.yml
      +
    8. detect-xorg.yml
      ---
      @@ -2243,130 +2251,130 @@ In order to achive a clean shutdown of the session, x@t7.service is
           name: vdr.service
           state: stopped
           enabled: yes
      -  notify: ['Start VDR']
      +  notify: ['Start VDR']
       
      -- name: Stop xlogin
      -  systemd:
      -    name: 'xlogin@{{ vdr.user }}.service'
      -    state: stopped
      -  notify: ['Start xlogin']
      +- name: Stop xlogin
      +  systemd:
      +    name: 'xlogin@{{ vdr.user }}.service'
      +    state: stopped
      +  notify: ['Start xlogin']
       
      -- name: Stop x
      -  systemd:
      -    name: x@vt7.service
      -    state: stopped
      +- name: Stop x
      +  systemd:
      +    name: x@vt7.service
      +    state: stopped
       
      -- name: Workaround for wrong connector names on first run
      -  block:
      -    - name: "wait a little bit before starting x-verbose@vt7.service (needed?)"
      -      wait_for:
      -        timeout: 10
      -    
      -    - name: "start x-verbose@.service"
      -      systemd:
      -          name: "x-verbose@vt7.service"
      -          state: started
      -          enabled: false
      -          masked: false
      -          daemon_reload: true
      -    
      -    - name: "wait a little bit, so X has some time to start up (needed?)"
      -      wait_for:
      -        timeout: 3
      -    
      -    - name: "stop x-verbose@vt7.service"
      -      systemd:
      -        name: "x-verbose@vt7.service"
      -        state: stopped
      -        enabled: false
      -        masked: true
      -  when: first_run
      +- name: Workaround for wrong connector names on first run
      +  block:
      +    - name: "wait a little bit before starting x-verbose@vt7.service (needed?)"
      +      wait_for:
      +        timeout: 10
      +    
      +    - name: "start x-verbose@.service"
      +      systemd:
      +          name: "x-verbose@vt7.service"
      +          state: started
      +          enabled: false
      +          masked: false
      +          daemon_reload: true
      +    
      +    - name: "wait a little bit, so X has some time to start up (needed?)"
      +      wait_for:
      +        timeout: 3
      +    
      +    - name: "stop x-verbose@vt7.service"
      +      systemd:
      +        name: "x-verbose@vt7.service"
      +        state: stopped
      +        enabled: false
      +        masked: true
      +  when: first_run
       
      -- name: "wait a little bit, so X has some time to shut down (needed?)"
      -  wait_for:
      -    timeout: 3
      +- name: "wait a little bit, so X has some time to shut down (needed?)"
      +  wait_for:
      +    timeout: 3
       
      -- name: "trigger udevadm reload"
      -  command: 'udevadm trigger '
      +- name: "trigger udevadm reload"
      +  command: 'udevadm trigger '
       
      -- name: "wait a little bit, so udev has some time to reapply rules (needed?)"
      -  wait_for:
      -    timeout: 3
      +- name: "wait a little bit, so udev has some time to reapply rules (needed?)"
      +  wait_for:
      +    timeout: 3
       
      -- name: "start x-verbose@.service"
      -  systemd:
      -    name: "x-verbose@vt7.service"
      -    state: started
      -    enabled: false
      -    masked: false
      -    daemon_reload: true
      +- name: "start x-verbose@.service"
      +  systemd:
      +    name: "x-verbose@vt7.service"
      +    state: started
      +    enabled: false
      +    masked: false
      +    daemon_reload: true
       
      -- name: "wait a little bit, so X has some time to start up (needed?)"
      -  wait_for:
      -    timeout: 3
      +- name: "wait a little bit, so X has some time to start up (needed?)"
      +  wait_for:
      +    timeout: 3
       
      -- name: "detect xorg configuration"
      -  action: xrandr_facts
      +- name: "detect xorg configuration"
      +  action: xrandr_facts
       
      -- debug:
      -    var: xorg.primary
      +- debug:
      +    var: xorg.primary
       
      -- debug:
      -    var: xorg.secondary
      -  when: xorg.secondary is defined
      +- debug:
      +    var: xorg.secondary
      +  when: xorg.secondary is defined
       
      -- name: "stop x-verbose@vt7.service"
      -  systemd:
      -    name: "x-verbose@vt7.service"
      -    state: stopped
      -    enabled: false
      -    masked: true
      +- name: "stop x-verbose@vt7.service"
      +  systemd:
      +    name: "x-verbose@vt7.service"
      +    state: stopped
      +    enabled: false
      +    masked: true
       
      -- name: "wait a little bit, so X has some time to shut down (needed?)"
      -  wait_for:
      -    timeout: 3
      +- name: "wait a little bit, so X has some time to shut down (needed?)"
      +  wait_for:
      +    timeout: 3
       
      -- name: save results
      -  block:
      -    - name: ensure facts.d directory exists
      -      file:
      -        state: directory
      -        path: /etc/ansible/facts.d
      +- name: save results
      +  block:
      +    - name: ensure facts.d directory exists
      +      file:
      +        state: directory
      +        path: /etc/ansible/facts.d
       
      -    - name: write xorg variable as local fact
      -      copy:
      -        content: '{{ {"xorg": xorg} | to_nice_json }}'
      -        dest: /etc/ansible/facts.d/xorg.fact
      +    - name: write xorg variable as local fact
      +      copy:
      +        content: '{{ {"xorg": xorg} | to_nice_json }}'
      +        dest: /etc/ansible/facts.d/xorg.fact
       
      -    - name: write xrandr variable as local fact
      -      copy:
      -        content: '{{ {"xrandr": xrandr} | to_nice_json }}'
      -        dest: /etc/ansible/facts.d/xrandr.fact
      -  when:
      -    - xrandr is defined
      -    - xorg is defined
      +    - name: write xrandr variable as local fact
      +      copy:
      +        content: '{{ {"xrandr": xrandr} | to_nice_json }}'
      +        dest: /etc/ansible/facts.d/xrandr.fact
      +  when:
      +    - xrandr is defined
      +    - xorg is defined
       
      -- name: update xorg and xrandr variable with values from local facts if needed
      -  set_fact:
      -    xorg: '{{ ansible_local.xorg }}'
      -    xrandr: '{{ ansible_local.xrandr }}'
      -  when:
      -    - xrandr is undefined
      -    - xorg is undefined
      +- name: update xorg and xrandr variable with values from local facts if needed
      +  set_fact:
      +    xorg: '{{ ansible_local.xorg }}'
      +    xrandr: '{{ ansible_local.xrandr }}'
      +  when:
      +    - xrandr is undefined
      +    - xorg is undefined
       
      -# TODO: expand template for xorg.conf (or snippets)
      -#       with respect for the available graphics card driver
      -#       nvidia, noveau, intel, radeon
      +# TODO: expand template for xorg.conf (or snippets)
      +#       with respect for the available graphics card driver
      +#       nvidia, noveau, intel, radeon
       
      -- name: nvidia related config
      -  block:
      -  - name: create xorg.conf (for nvidia driver)
      -    template:
      -        src: templates/xorg.conf.j2
      -        dest: /etc/X11/xorg.conf
      -        backup: yes
      -  when:
      -    - nvidia_detected
      +- name: nvidia related config
      +  block:
      +  - name: create xorg.conf (for nvidia driver)
      +    template:
      +        src: templates/xorg.conf.j2
      +        dest: /etc/X11/xorg.conf
      +        backup: yes
      +  when:
      +    - nvidia_detected
       
       
      @@ -2374,14 +2382,14 @@ In order to achive a clean shutdown of the session, x@t7.service is
    -
    -

    7.10.4 templates

    +
    +

    7.10.4 templates

      -
    1. xorg
      +
    2. xorg
        -
      1. x-verbose@.service
        +
      2. x-verbose@.service
        # file: roles/yavdr-xorg/templates/systemd/system/x-verbose@.service.j2
        @@ -2397,7 +2405,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
         
      3. -
      4. Drop-in snippet for x@.service
        +
      5. Drop-in snippet for x@.service
        [Unit]
        @@ -2423,7 +2431,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
         
      6. -
      7. Drop-in snippet for vdr.service
        +
      8. Drop-in snippet for vdr.service
        {{ ansible_managed | comment }}
        @@ -2435,7 +2443,7 @@ In order to achive a clean shutdown of the session, x@t7.service is
         
      9. -
      10. xorg.conf snippets
        +
      11. xorg.conf snippets
        {{ ansible_managed | comment }}
        @@ -2449,7 +2457,7 @@ EndSection
         
      12. -
      13. xorg.conf
        +
      14. xorg.conf
        Section "Device"
        @@ -2771,7 +2779,7 @@ EndSection
         
    3. -
    4. vdr
      +
    5. vdr

      Set environment variables for user session on startup @@ -2788,16 +2796,16 @@ Set environment variables for user session on startup

    -
    -

    7.11 yavdr-desktop

    +
    +

    7.11 yavdr-desktop

    -
    -

    7.11.1 Tasks

    +
    +

    7.11.1 Tasks

      -
    1. main.yml
      +
    2. main.yml
      ---
      @@ -2938,14 +2946,14 @@ Set environment variables for user session on startup
       
    -
    -

    7.11.2 Templates

    +
    +

    7.11.2 Templates

      -
    1. xorg configuration
      +
    2. xorg configuration
        -
      1. .Xresources
        +
      2. .Xresources
        xterm*background: Black
        @@ -2968,7 +2976,7 @@ XTerm.vt100.font: 7x13
         
      3. -
      4. .xinitrc
        +
      5. .xinitrc
        #!/bin/bash
        @@ -2980,9 +2988,9 @@ 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
        @@ -3018,7 +3026,7 @@ systemctl --user isolate yavdr-desktop.target
         
      3. -
      4. rc.xml
        +
      5. rc.xml
        <?xml version="1.0" encoding="UTF-8"?>
        @@ -3841,9 +3849,9 @@ systemctl --user isolate yavdr-desktop.target
         
    6. -
    7. Systemd User Session
      +
    8. Systemd User Session
        -
      1. yavdr-desktop.target
        +
      2. yavdr-desktop.target
        [Unit]
        @@ -3856,7 +3864,7 @@ systemctl --user isolate yavdr-desktop.target
         
      3. -
      4. detect-second-display
        +
      5. detect-second-display
        [Unit]
        @@ -3872,7 +3880,7 @@ systemctl --user isolate yavdr-desktop.target
         
      6. -
      7. openbox-second.service
        +
      8. openbox-second.service
        [Unit]
        @@ -3883,7 +3891,6 @@ systemctl --user isolate yavdr-desktop.target
         ConditionFileNotEmpty=%h/.second_display
         
         [Service]
        -PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
         EnvironmentFile=%h/.second_display
         ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml
         ExecStartPost=/bin/bash %h/.fehbg
        @@ -3894,7 +3901,7 @@ systemctl --user isolate yavdr-desktop.target
         
      9. -
      10. osd2web.service
        +
      11. osd2web.service
        [Unit]
        @@ -3904,7 +3911,6 @@ systemctl --user isolate yavdr-desktop.target
         ConditionFileNotEmpty=%h/.second_display
         
         [Service]
        -PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
         EnvironmentFile=%h/.second_display
         Environment=url="http://localhost:4444/skins/horchiTft/index.html?theme=anthraize&onlyView=1"
         Environment=browser="kiosk-browser"
        @@ -3918,7 +3924,7 @@ systemctl --user isolate yavdr-desktop.target
         
      12. -
      13. tmux.service
        +
      14. tmux.service
        [Unit]
        @@ -3937,7 +3943,7 @@ systemctl --user isolate yavdr-desktop.target
         
      15. -
      16. wm-exit.service
        +
      17. wm-exit.service
        [Unit]
        @@ -3956,7 +3962,7 @@ systemctl --user isolate yavdr-desktop.target
         
    9. -
    10. irexec
      +
    11. irexec

      irexec.service starts irexec for the user session @@ -3990,12 +3996,12 @@ end

    -
    -

    7.12 samba-install

    +
    +

    7.12 samba-install

    -
    -

    7.12.1 tasks

    +
    +

    7.12.1 tasks

    ---
    @@ -4017,12 +4023,12 @@ end
     
    -
    -

    7.13 samba-config

    +
    +

    7.13 samba-config

    -
    -

    7.13.1 tasks

    +
    +

    7.13.1 tasks

    ---
    @@ -4047,14 +4053,14 @@ end
     
    -
    -

    7.13.2 templates

    +
    +

    7.13.2 templates

      -
    1. smb.conf
      +
    2. smb.conf
        -
      1. global settings
        +
      2. global settings
        {{ ansible_managed | comment }}
        @@ -4140,7 +4146,7 @@ end
         
      3. -
      4. media directories
        +
      5. media directories
        {% for name, path in media_dirs.iteritems() %}
        @@ -4162,7 +4168,7 @@ end
         
      6. -
      7. include custom samba exports
        +
      8. include custom samba exports
        include = /etc/samba/smb.conf.custom
        @@ -4175,15 +4181,15 @@ end
         
    -
    -

    7.14 STARTED autoinstall-drivers

    +
    +

    7.14 STARTED autoinstall-drivers

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

    -
    -

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

    +
    +

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

    Vendor-IDs: @@ -4194,14 +4200,14 @@ Vendor-IDs:

    -
    -

    7.14.2 TODO dddvb-dkms if only newer DD cards are detected

    +
    +

    7.14.2 TODO dddvb-dkms if only newer DD cards are detected

    -
    -

    7.14.3 TODO media-build-experimental (up to kernel 4.8) for „old“ cards like TT S2-6400 FF

    +
    +

    7.14.3 TODO media-build-experimental (up to kernel 4.8) for „old“ cards like TT S2-6400 FF

    -
    -

    7.14.4 TODO newly merged DD drivers

    +
    +

    7.14.4 TODO newly merged DD drivers

    from http://www.vdr-portal.de/board18-vdr-hardware/board102-dvb-karten/120817-treiber-der-cine-ctv6-ddbridge-ci-in-den-kernel-integrieren/ @@ -4210,15 +4216,15 @@ from -

    7.15 autoinstall-ubuntu-drivers

    +
    +

    7.15 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.15.1 tasks

    +
    +

    7.15.1 tasks

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

    7.16 autoinstall-virtualbox-guest

    +
    +

    7.16 autoinstall-virtualbox-guest

    This role installs the guest additions for virtualbox guests on Ubuntu 16.04 @@ -4294,12 +4300,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04

    -
    -

    7.17 autoinstall-atric-usb

    +
    +

    7.17 autoinstall-atric-usb

    -
    -

    7.17.1 dependencies

    +
    +

    7.17.1 dependencies

    ---
    @@ -4311,8 +4317,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.17.2 tasks

    +
    +

    7.17.2 tasks

    ---
    @@ -4355,8 +4361,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.17.3 templates

    +
    +

    7.17.3 templates

    {{ ansible_managed | comment }}
    @@ -4385,12 +4391,12 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.18 autoinstall-yausbir

    +
    +

    7.18 autoinstall-yausbir

    -
    -

    7.18.1 dependencies

    +
    +

    7.18.1 dependencies

    ---
    @@ -4401,8 +4407,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.18.2 tasks

    +
    +

    7.18.2 tasks

    ---
    @@ -4445,8 +4451,8 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.18.3 templates

    +
    +

    7.18.3 templates

    {{ ansible_managed | comment }}
    @@ -4474,15 +4480,15 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
     
    -
    -

    7.19 autoinstall-satip

    +
    +

    7.19 autoinstall-satip

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

    -
    -

    7.19.1 tasks

    +
    +

    7.19.1 tasks

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

    7.20 autoinstall-targavfd

    +
    +

    7.20 autoinstall-targavfd

    -
    -

    7.20.1 tasks

    +
    +

    7.20.1 tasks

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

    7.21 autoinstall-imonlcd

    +
    +

    7.21 autoinstall-imonlcd

    -
    -

    7.21.1 tasks

    +
    +

    7.21.1 tasks

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

    7.22 autoinstall-libcecdaemon

    +
    +

    7.22 autoinstall-libcecdaemon

    -
    -

    7.22.1 tasks

    +
    +

    7.22.1 tasks

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

    7.23 autoinstall-pvr350

    +
    +

    7.23 autoinstall-pvr350

    -
    -

    7.23.1 tasks

    +
    +

    7.23.1 tasks

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

    7.24 autoinstall-hauppauge-pvr

    +
    +

    7.24 autoinstall-hauppauge-pvr

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

    7.25 autoinstall-firmware

    +
    +

    7.25 autoinstall-firmware

    -
    -

    7.25.1 dependencies

    +
    +

    7.25.1 dependencies

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

    7.25.2 tasks

    +
    +

    7.25.2 tasks

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

    7.26 autoinstall-dvbsky-firmware

    +
    +

    7.26 autoinstall-dvbsky-firmware

    -
    -

    7.26.1 dependencies

    +
    +

    7.26.1 dependencies

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

    7.26.2 defaults

    +
    +

    7.26.2 defaults

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

    7.26.3 tasks

    +
    +

    7.26.3 tasks

    ---
    @@ -4687,55 +4693,55 @@ If a Sat>IP Server responds to a discovery request, the package vdr-plugin-sa
       block:
         - name: add firmware files for DVBSky if a card has been detected
           set_fact:
    -        dvbsky_firmware_files: ['dvb-demod-m88ds3103.fw', 'dvb-demod-m88rs6000.fw', 'dvb-tuner-si2158-a20-01.fw', 'dvb-demod-si2168-a20-01.fw', 'dvb-demod-si2168-a30-01.fw', 'dvb-demod-si2168-b40-01.fw', 'dvb-fe-ds300x.fw', 'dvb-fe-ds3103.fw', 'dvb-fe-rs6000.fw']
    -      when:
    -        - '"1ade:3038" in pci'
    -  when:
    -    - not dvbsky_firmware_files
    +        dvbsky_firmware_files: ['dvb-demod-m88ds3103.fw', 'dvb-demod-m88rs6000.fw', 'dvb-tuner-si2158-a20-01.fw', 'dvb-demod-si2168-a20-01.fw', 'dvb-demod-si2168-a30-01.fw', 'dvb-demod-si2168-b40-01.fw', 'dvb-fe-ds300x.fw', 'dvb-fe-ds3103.fw', 'dvb-fe-rs6000.fw']
    +      when:
    +        - '"1ade:3038" in pci'
    +  when:
    +    - not dvbsky_firmware_files
     
    -- name: Download firmware for DVBSky cards and copy required files to /lib/firmware
    -  block:
    -    # download and extract firmware
    -    - unarchive:
    -        src: http://www.dvbsky.net/download/linux/dvbsky-firmware.tar.gz
    -        dest: /tmp/
    -        remote_src: yes
    +- name: Download firmware for DVBSky cards and copy required files to /lib/firmware
    +  block:
    +    # download and extract firmware
    +    - unarchive:
    +        src: http://www.dvbsky.net/download/linux/dvbsky-firmware.tar.gz
    +        dest: /tmp/
    +        remote_src: yes
     
    -    # copy firmware file
    -    - copy:
    -        src: "/tmp/dvbsky-firmware/{{ item }}"
    -        dest: /lib/firmware/
    -        owner: root
    -        group: root
    -        mode: 0644
    -      with_items: '{{ dvbsky_firmware_files }}'
    -      notify: ['Trigger Udev']
    +    # copy firmware file
    +    - copy:
    +        src: "/tmp/dvbsky-firmware/{{ item }}"
    +        dest: /lib/firmware/
    +        owner: root
    +        group: root
    +        mode: 0644
    +      with_items: '{{ dvbsky_firmware_files }}'
    +      notify: ['Trigger Udev']
     
    -    # Remove temporary files
    -    - file:
    -        path: /tmp/dvbsky-firmware
    -        state: absent
    -  when:
    -    - dvbsky_firmware_files is defined
    -    - dvbsky_firmware_files
    -  tags:
    -    - install
    -    - autodetect
    -    - dvbsky
    +    # Remove temporary files
    +    - file:
    +        path: /tmp/dvbsky-firmware
    +        state: absent
    +  when:
    +    - dvbsky_firmware_files is defined
    +    - dvbsky_firmware_files
    +  tags:
    +    - install
    +    - autodetect
    +    - dvbsky
     
    -
    -

    7.27 TODO autoinstall-dvbhddevice

    +
    +

    7.27 TODO autoinstall-dvbhddevice

    Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware sollte in yavdr-firmware stecken

    -
    -

    7.27.1 dependencies

    +
    +

    7.27.1 dependencies

    ---
    @@ -4746,8 +4752,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.27.2 tasks

    +
    +

    7.27.2 tasks

    ---
    @@ -4764,12 +4770,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.28 autoinstall-dvbsddevice

    +
    +

    7.28 autoinstall-dvbsddevice

    -
    -

    7.28.1 dependencies

    +
    +

    7.28.1 dependencies

    ---
    @@ -4780,8 +4786,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.28.2 tasks

    +
    +

    7.28.2 tasks

    ---
    @@ -4799,12 +4805,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.29 autoinstall-hardware-irmp

    +
    +

    7.29 autoinstall-hardware-irmp

    -
    -

    7.29.1 dependencies

    +
    +

    7.29.1 dependencies

    ---
    @@ -4815,8 +4821,8 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.29.2 tasks

    +
    +

    7.29.2 tasks

    ---
    @@ -4832,19 +4838,19 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
     
    -
    -

    7.30 kodi

    +
    +

    7.30 kodi

    -
    -

    7.30.1 tasks

    +
    -
    -

    7.30.2 templates

    +
    +

    7.30.2 templates

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

      This systemd unit for the user session starts (and stops) kodi. @@ -4949,15 +4955,15 @@ This systemd unit for the user session starts (and stops) kodi.

    -
    -

    7.30.3 files

    +
    +

    7.30.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. @@ -5027,14 +5033,14 @@ This file allows to map keys sent by remotes via eventlircd (which uses the name

  • -
  • keymaps
    +
  • keymaps

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

      -
    1. remote.xml
      +
    2. remote.xml
      <!-- This file contains the mapping of keys (gamepad, remote, and keyboard) to actions within XBMC -->
      @@ -5585,17 +5591,17 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
       
  • -
    -

    7.31 dvd

    +
    +

    7.31 dvd

    -
    -

    7.31.1 tasks

    +
    +

    7.31.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
      @@ -5622,7 +5628,7 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
         with_items:
             - 'libdvd-pkg/post-invoke_hook-install'
             - 'libdvd-pkg/build boolean'
      -  notify: ['Reconfigure unattended upgrades with dpkg']
      +  notify: ['Reconfigure unattended upgrades with dpkg']
       
       - 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
      @@ -5635,9 +5641,173 @@ This file maps the keys defined in Lircmap.xml to actions within kodi.
       
    -
    -

    7.32 template-test

    +
    +

    7.32 install-sundtek

    +
    +
    +

    7.32.1 variables

    +
    +
    +

    7.32.2 tasks

    +
    +
    +
    ---
    +# file roles/install-sundtek/tasks/main.yml
    +
    +- name: apt | install yavdr-hardware-sundtek
    +  apt:
    +    name: yavdr-hardware-sundtek
    +
    +# 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:
    +    name: sundtek.service
    +    state: started
    +    enabled: yes
    +    masked: no
    +    daemon-reload: yes
    +
    +- 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: systemd | start sundtek-avahi-mounter.service
    +  systemd:
    +    name: sundtek-avahi-mounter.service
    +    state: started
    +    masked: no
    +    enabled: yes
    +    daemon-reload: yes
    +
    +
    +
    +
    +
    +

    7.32.3 templates

    +
    +
    +
    # ----- GLOBAL SECTION -----
    +#Set loglevel for logging to /var/log/mediasrv.log
    +#autoupdate=[on|off]                    #enable automatic driver update, default off
    +autoupdate=off
    +#loglevel=[off|min|full]            #default: off
    +                    #max .. little bit more
    +loglevel=off
    +#pluginpath=/path/to/drivers            #set path to drivers
    +#dvb_api_version=x.y                    #default API version will be parsed from
    +                                        #/usr/include/linux/dvb/version.h, if no such file is
    +                                        #available the latest internally supported API version will be 
    +                                        #used (which will be quite new)
    +#audio_skip_bytes=N                     #when changing analogTV channels, 
    +                                        #skip N bytes to suppress audio noise
    +#bulk_notification[on|off]              #default off, bulk_notification will only trigger device_attach once
    +                                        #after the the first device scan when the driver is started up
    +                                        #after this first scan, the notification will be triggered
    +                                        #normally again for each device.
    +                                        #
    +                                        #for example when 2 devices are attached to the system only one
    +                                        #notification will be triggered initially, any at a later time
    +                                        #attached device will generate another device_attach notification
    +                                        #by default each device will call the script which is set up with
    +                                        #device_attach
    +#use_tvvideo=[on|off]                   #use /dev/tvvideoN instead of /dev/video
    +                                        #this works around a new Adobe Flash bug in 2012, where flash crashes
    +                                        #if files (/dev/videoN) other than /dev/video0 are available
    + 
    +#use_hwpidfilter=[on|off]               #For DVB-C, DVB-T, DVB-S/S2
    +                                        #enable PID filter, please be careful with that, there are only 15 HW Pid filters available
    +                                        #when more than 15 pids are set up the pid filter will be disabled automatically
    +
    +#dmhwpidfilter=[on|off]                 #default on, in some cases off might be useful to disable hw pid filter for settopboxes
    +                                        #if you get a black image when capturing a TV channel and watching another channel on the
    +                                        #same transponder - try this option and reboot
    +
    +#usb_transaction_delay=[0-20]           #throttle the USB setup transactions, this can solve problems with weak USB stacks for
    +                                        #example for embedded boards, unit is milliseconds
    +
    +#usb_timeout=[0 - N]                    #USB timeout for each transaction in milliseconds, 0 default infinite
    +#voltage_tone_off=[1 or 0]              #0 .. default, normal behaviour
    +                                        #1 .. force DVB-S/S2 to not use any Voltage or Tone (ignore any user parameters)
    +                                        
    +#ir_disabled=[1 or 0]                   #0 .. enable remote control polling, the driver will permanently check for remote control keys
    +                                        #1 .. disable remote control polling, might fix bugs with weak USB stacks on embedded boards
    +
    +#
    +#Enable listening on network
    +#enablenetwork=[on|off]         #default: off
    +
    +#Lowest adapter number to start with, e.g. /dev/dvb/adapter5/frontend0
    +#first_adapter=5
    +
    +#Call attach script when new device appears
    +#device_attach=[PATH_TO_SCRIPT] [PARAMETER|DEVID]   #"DEVID" will automatically be replaced with the device ID
    +device_attach=/usr/bin/sundtek_attach
    +
    +#Call detach script when device disappears
    +#device_detach=[PATH_TO_SCRIPT] [PARAMETER|DEVID]   #"DEVID" will automatically be replaced with the device ID
    +device_detach=/usr/bin/sundtek_detach
    +
    +
    +{% for device in sundtek_devices.local %}
    +{% if device.serial is defined %}
    +[{{ device.serial }}]
    +
    +#Infrared protocol to use
    +#ir_protocol=[RC5|NEC|RC6]          #default: NEC
    +{% if device.ir_protocol|default("") %}
    +ir_protocol={{ device.ir_protocol }}
    +{% endif %}
    +
    +#Keymap to use, e.g. "/lib/udev/rc_keymaps/vp702x"
    +#rcmap=[PATH_TO_KEYMAP]         #default: keymap which comes with the device
    +{% if device.rcmap|default("") %}
    +rcmap={{ device.rcmap }}
    +{% endif %}
    +
    +#Choose initial DVB mode for hybrid DVB-T/DVB-C devices only
    +#initial_dvb_mode=[DVBC|DVBT]
    +{% if device.initial_dvb_mode|default("") %}
    +initial_dvb_mode={{ device.dvb_mode }}
    +{% endif %}
    +
    +#Call attach script when new device appears
    +#device_attach=[PATH_TO_SCRIPT] [PARAMETER|DEVID]   #"DEVID" will automatically be replaced with the device ID
    +device_attach=/usr/bin/sundtek_attach
    +
    +#Call detach script when device disappears
    +#device_detach=[PATH_TO_SCRIPT] [PARAMETER|DEVID]   #"DEVID" will automatically be replaced with the device ID
    +device_detach=/usr/bin/sundtek_detach
    +
    +{% if device.capabilites.analog_tv %}
    +disable_analogtv=1                                      #disable initialization of analogTV Frontend
    +{% endif %}
    +
    +{% endif %}
    +{% endfor %}
    +
    +
    +
    +
    +
    +
    +

    7.33 template-test

    +
    ---
     
    @@ -5877,13 +6047,13 @@ EndSection
     
    -
    -

    7.33 wakeup

    -
    +
    +

    7.34 wakeup

    +
    -
    -

    7.33.1 defaults

    -
    +
    +

    7.34.1 defaults

    +
    ---
     # file roles/wakeup/defaults/main.yml
    @@ -5892,9 +6062,9 @@ EndSection
     
    -
    -

    7.33.2 tasks

    -
    +
    +

    7.34.2 tasks

    +
    ---
     # file roles/wakeup/tasks/main.yml
    @@ -5914,9 +6084,9 @@ EndSection
     
    -
    -

    7.33.3 templates

    -
    +
    +

    7.34.3 templates

    +
    {{ ansible_managed | comment }}
     
    @@ -5941,13 +6111,13 @@ ACPI_START_AHEAD=5
     
    -
    -

    7.34 grub-config

    -
    +
    +

    7.35 grub-config

    +
    -
    -

    7.34.1 default variables

    -
    +
    +

    7.35.1 default variables

    +
    system:
       shutdown: poweroff
    @@ -5958,9 +6128,9 @@ ACPI_START_AHEAD=5
     
    -
    -

    7.34.2 tasks

    -
    +
    +

    7.35.2 tasks

    +
    ---
     
    @@ -5984,9 +6154,9 @@ ACPI_START_AHEAD=5
     
    -
    -

    7.34.3 templates

    -
    +
    +

    7.35.3 templates

    +
    #!/bin/sh
     exec tail -n +3 $0
    @@ -6008,34 +6178,34 @@ menuentry "PowerOff" {
     
    -
    -

    7.34.4 handlers

    -
    +
    +

    7.35.4 handlers

    +
    ---
     
     - name: Update GRUB
       command: update-grub
    -  failed_when: ('error' in grub_register_update.stderr)
    -  register: grub_register_update
    +  failed_when: ('error' in grub_register_update.stderr)
    +  register: grub_register_update
     
    -  # TODO: Do we need to use grub-set-default?
    -  # https://github.com/yavdr/yavdr-utils/blob/master/events/actions/update-grub
    +  # TODO: Do we need to use grub-set-default?
    +  # https://github.com/yavdr/yavdr-utils/blob/master/events/actions/update-grub
     
    -
    -

    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.
    @@ -6212,8 +6382,8 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
     
    -
    -

    8.2 satip_facts.py

    +
    +

    8.2 satip_facts.py

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

    8.3 xrandr_facts.py

    +
    +

    8.3 xrandr_facts.py

    • [ ] support multiple screens (-d :0.0 .. :0.n)
    • @@ -6620,8 +6790,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
    @@ -6646,6 +6816,13 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
         #masked: no
       register: nfs_reload
     
    +- name: Restart sundtek.service
    +  systemd:
    +    name: sundtek.service
    +    state: restarted
    +    enabled: yes
    +    masked: no
    +
     - name: Restart VDR
       systemd:
         name: vdr.service
    @@ -6694,7 +6871,7 @@ This section contains custom modules for the yaVDR Playbooks. They are used to c
     

    Autor: Alexander Grothe <seahawk1986@gmx.de>

    -

    Created: 2018-02-12 Mo 16:40

    +

    Created: 2018-03-25 So 13:07

    Validate

    diff --git a/Manual.org b/Manual.org index a1c30af..7c8551c 100644 --- a/Manual.org +++ b/Manual.org @@ -3392,7 +3392,6 @@ Before=yavdr-frontend.service ConditionFileNotEmpty=%h/.second_display [Service] -PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS EnvironmentFile=%h/.second_display ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml ExecStartPost=/bin/bash %h/.fehbg @@ -3409,7 +3408,6 @@ Wants=detect-second-display.service openbox-second.service ConditionFileNotEmpty=%h/.second_display [Service] -PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS EnvironmentFile=%h/.second_display Environment=url="http://localhost:4444/skins/horchiTft/index.html?theme=anthraize&onlyView=1" Environment=browser="kiosk-browser" @@ -4050,6 +4048,154 @@ This file maps the keys defined in Lircmap.xml to actions within kodi. :UNNUMBERED: t :END: #+INCLUDE: "roles/dvd/tasks/main.yml" src yaml +** install-sundtek +*** variables +*** tasks +#+BEGIN_SRC yaml :tangle roles/install-sundtek/tasks/main.yml :padline no +--- +# file roles/install-sundtek/tasks/main.yml + +- name: apt | install yavdr-hardware-sundtek + apt: + name: yavdr-hardware-sundtek + +# 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: + name: sundtek.service + state: started + enabled: yes + masked: no + daemon-reload: yes + +- 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: systemd | start sundtek-avahi-mounter.service + systemd: + name: sundtek-avahi-mounter.service + state: started + masked: no + enabled: yes + daemon-reload: yes +#+END_SRC +*** templates +#+BEGIN_SRC conf +# ----- GLOBAL SECTION ----- +#Set loglevel for logging to /var/log/mediasrv.log +#autoupdate=[on|off] #enable automatic driver update, default off +autoupdate=off +#loglevel=[off|min|full] #default: off + #max .. little bit more +loglevel=off +#pluginpath=/path/to/drivers #set path to drivers +#dvb_api_version=x.y #default API version will be parsed from + #/usr/include/linux/dvb/version.h, if no such file is + #available the latest internally supported API version will be + #used (which will be quite new) +#audio_skip_bytes=N #when changing analogTV channels, + #skip N bytes to suppress audio noise +#bulk_notification[on|off] #default off, bulk_notification will only trigger device_attach once + #after the the first device scan when the driver is started up + #after this first scan, the notification will be triggered + #normally again for each device. + # + #for example when 2 devices are attached to the system only one + #notification will be triggered initially, any at a later time + #attached device will generate another device_attach notification + #by default each device will call the script which is set up with + #device_attach +#use_tvvideo=[on|off] #use /dev/tvvideoN instead of /dev/video + #this works around a new Adobe Flash bug in 2012, where flash crashes + #if files (/dev/videoN) other than /dev/video0 are available + +#use_hwpidfilter=[on|off] #For DVB-C, DVB-T, DVB-S/S2 + #enable PID filter, please be careful with that, there are only 15 HW Pid filters available + #when more than 15 pids are set up the pid filter will be disabled automatically + +#dmhwpidfilter=[on|off] #default on, in some cases off might be useful to disable hw pid filter for settopboxes + #if you get a black image when capturing a TV channel and watching another channel on the + #same transponder - try this option and reboot + +#usb_transaction_delay=[0-20] #throttle the USB setup transactions, this can solve problems with weak USB stacks for + #example for embedded boards, unit is milliseconds + +#usb_timeout=[0 - N] #USB timeout for each transaction in milliseconds, 0 default infinite +#voltage_tone_off=[1 or 0] #0 .. default, normal behaviour + #1 .. force DVB-S/S2 to not use any Voltage or Tone (ignore any user parameters) + +#ir_disabled=[1 or 0] #0 .. enable remote control polling, the driver will permanently check for remote control keys + #1 .. disable remote control polling, might fix bugs with weak USB stacks on embedded boards + +# +#Enable listening on network +#enablenetwork=[on|off] #default: off + +#Lowest adapter number to start with, e.g. /dev/dvb/adapter5/frontend0 +#first_adapter=5 + +#Call attach script when new device appears +#device_attach=[PATH_TO_SCRIPT] [PARAMETER|DEVID] #"DEVID" will automatically be replaced with the device ID +device_attach=/usr/bin/sundtek_attach + +#Call detach script when device disappears +#device_detach=[PATH_TO_SCRIPT] [PARAMETER|DEVID] #"DEVID" will automatically be replaced with the device ID +device_detach=/usr/bin/sundtek_detach + + +{% for device in sundtek_devices.local %} +{% if device.serial is defined %} +[{{ device.serial }}] + +#Infrared protocol to use +#ir_protocol=[RC5|NEC|RC6] #default: NEC +{% if device.ir_protocol|default("") %} +ir_protocol={{ device.ir_protocol }} +{% endif %} + +#Keymap to use, e.g. "/lib/udev/rc_keymaps/vp702x" +#rcmap=[PATH_TO_KEYMAP] #default: keymap which comes with the device +{% if device.rcmap|default("") %} +rcmap={{ device.rcmap }} +{% endif %} + +#Choose initial DVB mode for hybrid DVB-T/DVB-C devices only +#initial_dvb_mode=[DVBC|DVBT] +{% if device.initial_dvb_mode|default("") %} +initial_dvb_mode={{ device.dvb_mode }} +{% endif %} + +#Call attach script when new device appears +#device_attach=[PATH_TO_SCRIPT] [PARAMETER|DEVID] #"DEVID" will automatically be replaced with the device ID +device_attach=/usr/bin/sundtek_attach + +#Call detach script when device disappears +#device_detach=[PATH_TO_SCRIPT] [PARAMETER|DEVID] #"DEVID" will automatically be replaced with the device ID +device_detach=/usr/bin/sundtek_detach + +{% if device.capabilites.analog_tv %} +disable_analogtv=1 #disable initialization of analogTV Frontend +{% endif %} + +{% endif %} +{% endfor %} +#+END_SRC ** template-test :PROPERTIES: :EXPORT: nil @@ -4988,6 +5134,13 @@ if __name__ == '__main__': #masked: no register: nfs_reload +- name: Restart sundtek.service + systemd: + name: sundtek.service + state: restarted + enabled: yes + masked: no + - name: Restart VDR systemd: name: vdr.service diff --git a/handlers/main.yml b/handlers/main.yml index 2343b80..b9410b5 100644 --- a/handlers/main.yml +++ b/handlers/main.yml @@ -20,6 +20,13 @@ #masked: no register: nfs_reload +- name: Restart sundtek.service + systemd: + name: sundtek.service + state: restarted + enabled: yes + masked: no + - name: Restart VDR systemd: name: vdr.service diff --git a/roles/yavdr-desktop/templates/systemd/user/openbox-second.service.j2 b/roles/yavdr-desktop/templates/systemd/user/openbox-second.service.j2 index fec0aa6..61d156f 100644 --- a/roles/yavdr-desktop/templates/systemd/user/openbox-second.service.j2 +++ b/roles/yavdr-desktop/templates/systemd/user/openbox-second.service.j2 @@ -6,7 +6,6 @@ Before=yavdr-frontend.service ConditionFileNotEmpty=%h/.second_display [Service] -PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS EnvironmentFile=%h/.second_display ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml ExecStartPost=/bin/bash %h/.fehbg diff --git a/roles/yavdr-desktop/templates/systemd/user/osd2web.service.j2 b/roles/yavdr-desktop/templates/systemd/user/osd2web.service.j2 index 5d6d46a..b8e755f 100644 --- a/roles/yavdr-desktop/templates/systemd/user/osd2web.service.j2 +++ b/roles/yavdr-desktop/templates/systemd/user/osd2web.service.j2 @@ -5,7 +5,6 @@ Wants=detect-second-display.service openbox-second.service ConditionFileNotEmpty=%h/.second_display [Service] -PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS EnvironmentFile=%h/.second_display Environment=url="http://localhost:4444/skins/horchiTft/index.html?theme=anthraize&onlyView=1" Environment=browser="kiosk-browser"