4 Commits

Author SHA1 Message Date
Alexander Grothe
7dc7902180 Fix role name in yavdr07-headless.yml 2018-01-28 16:46:59 +01:00
Alexander Grothe
2e759806e1 Add more DVBSky firmware files to list 2017-12-17 12:25:12 +01:00
Alexander Grothe
f6b6e818de Fix video directory path 2017-12-17 09:17:41 +01:00
Alexander Grothe
640d27dfa3 Fix condition to ubuntu-drivers autoinstall 2017-12-16 19:51:53 +01:00
41 changed files with 684 additions and 2113 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -135,26 +135,23 @@ cd yavdr-ansible
sudo ./install-yavdr.sh sudo ./install-yavdr.sh
#+END_SRC #+END_SRC
We use a callback to generate tags for all roles autmatically:
#+INCLUDE: "ansible.cfg" src conf
** Install script for local usage ** Install script for local usage
#+BEGIN_SRC shell :tangle install-yavdr.sh :shebang "#!/bin/bash" #+BEGIN_SRC shell :tangle install-yavdr.sh :shebang "#!/bin/bash"
if (( $EUID != 0 )); then if (( $EUID != 0 )); then
echo "This script must be run using sudo -H or as root" echo "This script must be run using sudo or as root"
exit exit
fi fi
apt-get -y install software-properties-common apt-get -y install software-properties-common
# Add repository for ansible # Add repository for ansible
add-apt-repository -y ppa:yavdr/experimental-main add-apt-repository -y ppa:ansible/ansible
# update packages # update packages
apt-get update apt-get update
# install required packages # install required packages
apt-get -y install --no-install-recommends ansible apt-get -y install --no-install-recommends ansible
# TODO: run ansible on local host # TODO: run ansible on local host
ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="all" ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags=install
#+END_SRC #+END_SRC
* Playbooks * Playbooks
** yavdr07.yml ** yavdr07.yml
@@ -189,13 +186,14 @@ The ~yavdr07.yml~ playbook sets up a fully-featured yaVDR installation:
- autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found
- autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
- autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected - autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected
- autoinstall-atric-usb # preconfigure lircd for Atric IR-WakeupUSB receiver
- autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards - autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards
- kodi - kodi
- dvd # set up packages and a udev rule to allow kodi and other players - dvd # set up packages and a udev rule to allow kodi and other players
# to play and eject optical media # to play and eject optical media
- wakeup # set up wakeup methods for rtc etc. - wakeup # set up wakeup methods for rtc etc.
- grub-config # configure grub - grub-config # configure grub
tags:
- always
handlers: handlers:
- import_tasks: handlers/main.yml - import_tasks: handlers/main.yml
@@ -241,18 +239,19 @@ localhost connection=local
# file: group_vars/all # file: group_vars/all
# this is the standard text to put in templates # this is the standard text to put in templates
ansible_managed_file: "*** YAVDR: ANSIBLE MANAGED FILE ***\norigin: {file}" ansible_managed_file: "*** YAVDR: ANSIBLE MANAGED FILE ***"
#+END_SRC #+END_SRC
** PPAs ** PPAs
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes #+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
branch: experimental branch: unstable
ppa_owner: 'ppa:yavdr' ppa_owner: 'ppa:yavdr'
# add the following PPAs # add the following PPAs
repositories: repositories:
- '{{ ppa_owner }}/{{branch}}-main' - '{{ ppa_owner }}/main'
- '{{ ppa_owner }}/unstable-main'
- '{{ ppa_owner }}/{{branch}}-vdr' - '{{ ppa_owner }}/{{branch}}-vdr'
#- '{{ ppa_owner }}/{{branch}}-yavdr' - '{{ ppa_owner }}/{{branch}}-yavdr'
#- '{{ ppa_owner }}/{{branch}}-kodi' - '{{ ppa_owner }}/{{branch}}-kodi'
#+END_SRC #+END_SRC
** VDR user, directories, special configuration and plugins ** VDR user, directories, special configuration and plugins
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes #+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
@@ -275,6 +274,7 @@ vdr_plugins:
- vdr-plugin-markad - vdr-plugin-markad
- vdr-plugin-restfulapi - vdr-plugin-restfulapi
- vdr-plugin-softhddevice-vpp - vdr-plugin-softhddevice-vpp
#+END_SRC #+END_SRC
** Media directories ** Media directories
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes #+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
@@ -308,7 +308,6 @@ extra_packages:
- tree - tree
- vim - vim
- w-scan - w-scan
- plymouth-theme-yavdr-logo
#+END_SRC #+END_SRC
** System pre-configuration ** System pre-configuration
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes #+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
@@ -318,7 +317,7 @@ frontend: vdr
wakeup_method: acpiwakeup wakeup_method: acpiwakeup
grub: grub:
timeout: 0 timeout: 0
boot_options: quiet splash boot_options: quiet nosplash
#+END_SRC #+END_SRC
* Roles * Roles
** install-dependencies ** install-dependencies
@@ -348,8 +347,6 @@ install nvidia-387 from ppa:graphics-drivers/ppa
repo: 'ppa:graphics-drivers/ppa' repo: 'ppa:graphics-drivers/ppa'
state: present state: present
update_cache: yes update_cache: yes
tags:
- ppa
- name: install nvidia-387 and other required packages - name: install nvidia-387 and other required packages
apt: apt:
@@ -359,8 +356,6 @@ install nvidia-387 from ppa:graphics-drivers/ppa
with_items: with_items:
- nvidia-387 - nvidia-387
- nvidia-settings - nvidia-settings
tags:
- packages
#+END_SRC #+END_SRC
** yavdr-common ** yavdr-common
This role is used to set up a basic yaVDR installation. It creates the directories, installs the vdr and other useful packages. This role is used to set up a basic yaVDR installation. It creates the directories, installs the vdr and other useful packages.
@@ -453,8 +448,6 @@ yavdr-common executes the following tasks:
state: present state: present
update_cache: yes update_cache: yes
with_items: '{{ repositories }}' with_items: '{{ repositories }}'
tags:
- ppa
- name: run apt-get dist-upgrade - name: run apt-get dist-upgrade
apt: apt:
@@ -581,8 +574,6 @@ APT::Install-Suggests "0";
modules: True modules: True
gpus: True gpus: True
acpi_power_modes: True acpi_power_modes: True
tags:
- always
- debug: - debug:
var: '{{ item }}' var: '{{ item }}'
@@ -597,13 +588,6 @@ APT::Install-Suggests "0";
- intel_detected - intel_detected
- amd_detected - amd_detected
- virtualbox_detected - virtualbox_detected
- name: known vdr output plugins
set_fact:
vdr_output_plugins:
- softhddevice
- xineliboutput
- xine
#+END_SRC #+END_SRC
** vdr ** vdr
*** tasks *** tasks
@@ -647,10 +631,11 @@ APT::Install-Suggests "0";
blockinfile: blockinfile:
dest: /etc/vdr/conf.d/04-vdr-hide-first-recordinglevel.conf dest: /etc/vdr/conf.d/04-vdr-hide-first-recordinglevel.conf
create: true create: true
state: "{{ 'present' if vdr.hide_first_recording_level else 'absent' }}"
block: | block: |
[vdr] [vdr]
--hide-first-recording-level --hide-first-recording-level
when:
vdr.hide_first_recording_level
- name: create local dir in recdir - name: create local dir in recdir
file: file:
@@ -865,7 +850,7 @@ install_avahi: true
--- ---
# this playbook sets up network services for a yaVDR installation # this playbook sets up network services for a yaVDR installation
- name: apt | install packages for network services - name: apt |install packages for network services
apt: apt:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
@@ -976,38 +961,25 @@ install_avahi: true
#+END_SRC #+END_SRC
** STARTED yavdr-remote ** STARTED yavdr-remote
*** default variables *** default variables
#+BEGIN_SRC yaml :tangle roles/yavdr-remote/defaults/main.yml :mkdirp yes :padline no
lircd0_socket: /var/run/lirc/lircd0
#+END_SRC
*** tasks *** tasks
#+BEGIN_SRC yaml :tangle roles/yavdr-remote/tasks/main.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/yavdr-remote/tasks/main.yml :mkdirp yes :padline no
--- ---
# This role is used to set up the yaVDR remote control configuration. # This role is used to set up the yaVDR remote control configuration.
- name: apt | install packages for remote support - name: apt | install yavdr-remote
apt: apt:
name: '{{ item }}' name: yavdr-remote
state: present state: present
with_items:
- yavdr-remote
- lirc
- eventlircd
- lircd2uinput
tags:
- packages
- name: add systemd drop-in for lircd to use lircd2uinput - name: apt | install eventlircd
block: apt:
- name: create directory /etc/systemd/system/lircd.service.d/ name: eventlircd
file: state: present
path: /etc/systemd/system/lircd.service.d/
state: directory - name: apt | install lirc
- name: expand template for /etc/systemd/system/lircd.service.d/lircd2uinput.conf apt:
template: name: lirc
src: templates/lircd.service.d/lircd2uinput.conf.j2 state: present
dest: /etc/systemd/system/lircd.service.d/lircd2uinput.conf
tags:
- config
- name: stop, mask and disable lircd.socket, lircd.service and lircd-uinput.service # (the default lirc configuration conflicts with eventlircd) - name: stop, mask and disable lircd.socket, lircd.service and lircd-uinput.service # (the default lirc configuration conflicts with eventlircd)
systemd: systemd:
@@ -1020,224 +992,29 @@ lircd0_socket: /var/run/lirc/lircd0
- lircd.socket - lircd.socket
- lircd-uinput.service - lircd-uinput.service
ignore_errors: yes ignore_errors: yes
tags:
- systemd
- name: configure vdr to read from a lircd-compatible socket - name: configure vdr to read from a lircd-compatible socket
template: template:
src: templates/03-vdr-lirc.conf.j2 src: templates/03-vdr-lirc.conf.j2
dest: /etc/vdr/conf.d/03-vdr-lirc.conf dest: /etc/vdr/conf.d/03-vdr-lirc.conf
notify: ['Restart VDR'] notify: ['Restart VDR']
tags:
- config
- name: expand template for /etc/rc_maps.cfg # TODO: upload lircd2uinput package to PPA
template: #- name: install lircd2uinput
src: templates/rc_maps.cfg.j2 # tag: install
dest: /etc/rc_maps.cfg # apt:
notify: ['Trigger Udev'] # name: lircd2uinput
tags: # state: present
- config # when:
# install_eventlircd is defined and install_eventlircd
#+END_SRC #+END_SRC
*** templates *** templates
**** Systemd Drop-in to start vdr with lirc support
#+BEGIN_SRC conf :tangle roles/yavdr-remote/templates/03-vdr-lirc.conf.j2 :mkdirp yes :padline no #+BEGIN_SRC conf :tangle roles/yavdr-remote/templates/03-vdr-lirc.conf.j2 :mkdirp yes :padline no
{% if frontend != 'kodi' %} {% if frontend != 'kodi' %}
[vdr] [vdr]
--lirc=/var/run/lirc/lircd --lirc=/var/run/lirc/lircd
{% endif %} {% endif %}
#+END_SRC #+END_SRC
**** Systemd Drop-in to start lircd2uinput with lircd
#+BEGIN_SRC conf :tangle roles/yavdr-remote/templates/lircd.service.d/lircd2uinput.conf.j2 :mkdirp yes :padline no
[Service]
ExecStartPost=/usr/bin/lircd2uinput-add /var/run/lirc/lircd0
ExecStopPost=/usr/bin/lircd2uinput-remove /var/run/lirc/lircd0
#+END_SRC
**** create /etc/rc_maps.cfg
#+BEGIN_SRC conf :tangle roles/yavdr-remote/templates/rc_maps.cfg.j2 :mkdirp yes :padline no
#
# Keymaps table
#
# This table creates an association between a keycode file and a kernel
# driver. It can be used to automatically override a keycode definition.
#
# Although not yet tested, it is mented to be added at udev.
#
# To use, you just need to run:
# ./ir-keytable -a
#
# Or, if the remote is not the first device:
# ./ir-keytable -a -s rc1 # for RC at rc1
#
# Format:
# driver - name of the driver provided via uevent - use * for any driver
# table - RC keymap table, provided via uevent - use * for any table
# file - file name. If directory is not specified, it will default to
# /etc/rc_keymaps.
# For example:
# driver table file
# cx8800 * ./keycodes/rc5_hauppauge_new
# * rc-avermedia-m135a-rm-jx ./keycodes/kworld_315u
# saa7134 rc-avermedia-m135a-rm-jx ./keycodes/keycodes/nec_terratec_cinergy_xs
# em28xx * ./keycodes/kworld_315u
# * * ./keycodes/rc5_hauppauge_new
# Table to automatically load the rc maps for the bundled IR's provided with the
# devices supported by the linux kernel
#driver table file
,* rc-adstech-dvb-t-pci adstech_dvb_t_pci
,* rc-alink-dtu-m alink_dtu_m
,* rc-anysee anysee
,* rc-apac-viewcomp apac_viewcomp
,* rc-asus-pc39 asus_pc39
,* rc-asus-ps3-100 asus_ps3_100
,* rc-ati-tv-wonder-hd-600 ati_tv_wonder_hd_600
,* rc-ati-x10 ati_x10
,* rc-avermedia-a16d avermedia_a16d
,* rc-avermedia-cardbus avermedia_cardbus
,* rc-avermedia-dvbt avermedia_dvbt
,* rc-avermedia-m135a avermedia_m135a
,* rc-avermedia-m733a-rm-k6 avermedia_m733a_rm_k6
,* rc-avermedia-rm-ks avermedia_rm_ks
,* rc-avermedia avermedia
,* rc-avertv-303 avertv_303
,* rc-azurewave-ad-tu700 azurewave_ad_tu700
,* rc-behold-columbus behold_columbus
,* rc-behold behold
,* rc-budget-ci-old budget_ci_old
,* rc-cec cec
,* rc-cinergy-1400 cinergy_1400
,* rc-cinergy cinergy
,* rc-delock-61959 delock_61959
,* rc-dib0700-nec dib0700_nec
,* rc-dib0700-rc5 dib0700_rc5
,* rc-digitalnow-tinytwin digitalnow_tinytwin
,* rc-digittrade digittrade
,* rc-dm1105-nec dm1105_nec
,* rc-dntv-live-dvb-t dntv_live_dvb_t
,* rc-dntv-live-dvbt-pro dntv_live_dvbt_pro
,* rc-dtt200u dtt200u
,* rc-dvbsky dvbsky
,* rc-em-terratec em_terratec
,* rc-encore-enltv-fm53 encore_enltv_fm53
,* rc-encore-enltv encore_enltv
,* rc-encore-enltv2 encore_enltv2
,* rc-evga-indtube evga_indtube
,* rc-eztv eztv
,* rc-flydvb flydvb
,* rc-flyvideo flyvideo
,* rc-fusionhdtv-mce fusionhdtv_mce
,* rc-gadmei-rm008z gadmei_rm008z
,* rc-genius-tvgo-a11mce genius_tvgo_a11mce
,* rc-gotview7135 gotview7135
,* rc-hauppauge hauppauge
#* rc-imon-mce imon_mce
#* rc-imon-pad imon_pad
,* rc-iodata-bctv7e iodata_bctv7e
,* rc-it913x-v1 it913x_v1
,* rc-it913x-v2 it913x_v2
,* rc-kaiomy kaiomy
,* rc-kworld-315u kworld_315u
,* rc-kworld-pc150u kworld_pc150u
,* rc-kworld-plus-tv-analog kworld_plus_tv_analog
,* rc-leadtek-y04g0051 leadtek_y04g0051
,* rc-lme2510 lme2510
,* rc-manli manli
,* rc-medion-x10-digitainer medion_x10_digitainer
,* rc-medion-x10-or2x medion_x10_or2x
,* rc-medion-x10 medion_x10
,* rc-msi-digivox-ii msi_digivox_ii
,* rc-msi-digivox-iii msi_digivox_iii
,* rc-msi-tvanywhere-plus msi_tvanywhere_plus
,* rc-msi-tvanywhere msi_tvanywhere
,* rc-nebula nebula
,* rc-nec-terratec-cinergy-xs nec_terratec_cinergy_xs
,* rc-norwood norwood
,* rc-npgtech npgtech
,* rc-pctv-sedna pctv_sedna
,* rc-pinnacle-color pinnacle_color
,* rc-pinnacle-grey pinnacle_grey
,* rc-pinnacle-pctv-hd pinnacle_pctv_hd
,* rc-pixelview-002t pixelview_002t
,* rc-pixelview-mk12 pixelview_mk12
,* rc-pixelview-new pixelview_new
,* rc-pixelview pixelview
,* rc-powercolor-real-angel powercolor_real_angel
,* rc-proteus-2309 proteus_2309
,* rc-purpletv purpletv
,* rc-pv951 pv951
,* rc-real-audio-220-32-keys real_audio_220_32_keys
,* rc-reddo reddo
,* rc-snapstream-firefly snapstream_firefly
,* rc-streamzap streamzap
,* rc-su3000 su3000
,* rc-tbs-nec tbs_nec
,* rc-technisat-ts35 technisat_ts35
,* rc-technisat-usb2 technisat_usb2
,* rc-terratec-cinergy-c-pci terratec_cinergy_c_pci
,* rc-terratec-cinergy-s2-hd terratec_cinergy_s2_hd
,* rc-terratec-cinergy-xs terratec_cinergy_xs
,* rc-terratec-slim-2 terratec_slim_2
,* rc-terratec-slim terratec_slim
,* rc-tevii-nec tevii_nec
,* rc-tivo tivo
,* rc-total-media-in-hand-02 total_media_in_hand_02
,* rc-total-media-in-hand total_media_in_hand
,* rc-trekstor trekstor
,* rc-tt-1500 tt_1500
,* rc-twinhan-dtv-cab-ci twinhan_dtv_cab_ci
,* rc-twinhan1027 twinhan_vp1027_dvbs
,* rc-videomate-k100 videomate_k100
,* rc-videomate-s350 videomate_s350
,* rc-videomate-tv-pvr videomate_tv_pvr
,* rc-winfast-usbii-deluxe winfast_usbii_deluxe
,* rc-winfast winfast
# * * a800 # found in a800.c
# * * af9005 # found in af9005-remote.c
# * * cinergyt2 # found in cinergyT2-core.c
# * * dvico_mce # found in cxusb.c
# * * dvico_portable # found in cxusb.c
# * * d680_dmb # found in cxusb.c
# * * dibusb # found in dibusb-common.c
# * * digitv # found in digitv.c
# * * megasky # found in m920x.c
# * * tvwalkerir-kbd-i2c rc-hauppauge /lib/udev/rc_keymaps/rc-hauppaugetwin # found in m920x.c
# * * pinnacle310e # found in m920x.c
# * * haupp # found in nova-t-usb2.c
# * * opera1 # found in opera1.c
# * * vp702x # found in vp702x.c
# * * vp7045 # found in vp7045.c
# Hauppauge PVR 350
ir-kbd-i2c rc-hauppauge /lib/udev/rc_keymaps/rc-hauppauge
# imon-pad
imon rc-imon-pad /lib/udev/rc_keymaps/rc-imon-pad
imon rc-imon-mce /lib/udev/rc_keymaps/rc-imon-mce
# TT-1500/1501
,* rc-tt-1500 /lib/udev/rc_keymaps/rc-tt-1500
budget_ci rc-tt-1500 /lib/udev/rc_keymaps/rc-tt-1501
# rc-rc6-mce
,* rc-rc6-mce /lib/udev/rc_keymaps/rc-rc6-mce
# CIR
ite-cir rc-rc6-mce /lib/udev/rc_keymaps/rc-rc6-mce
nuvoton-cir rc-rc6-mce /lib/udev/rc_keymaps/rc-rc6-mce
# mceusb
mceusb rc-rc6-mce /lib/udev/rc_keymaps/HOPLOrc6
# Skystarhd2
mantis_core * /lib/udev/rc_keymaps/skystarhd2
# Medion X10
ati_remote rc-medion-x10 /lib/udev/rc_keymaps/rc-medion-x10
ati_remote rc-medion-x10-or2x /lib/udev/rc_keymaps/rc-medion-x10-or2x
ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digitainer
#+END_SRC
*** files *** files
** pulseaudio ** pulseaudio
@@ -1245,7 +1022,7 @@ ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digi
#+BEGIN_SRC yaml :tangle roles/pulseaudio/tasks/main.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/pulseaudio/tasks/main.yml :mkdirp yes :padline no
--- ---
- name: apt | install pulseaudio, pavucontrol and vdr-plugin-pulsecontrol - name: apt | install pulseaudio and pavucontrol
apt: apt:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
@@ -1253,7 +1030,6 @@ ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digi
with_items: with_items:
- pulseaudio - pulseaudio
- pavucontrol - pavucontrol
- vdr-plugin-pulsecontrol
- name: create /etc/asound.conf with pulseaudio as default device - name: create /etc/asound.conf with pulseaudio as default device
template: template:
@@ -1282,7 +1058,6 @@ ctl.!default {
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. 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.
~x@vt7.service~ is started automatically as a dependency of ~xlogin@vdr.service~ and starts the X-server. ~xlogin@vdr.service~ also starts a systemd user session using ~user@666.service~. ~x@vt7.service~ is started automatically as a dependency of ~xlogin@vdr.service~ and starts the X-server. ~xlogin@vdr.service~ also starts a systemd user session using ~user@666.service~.
In order to use the keyboard layout configured during installation for the X-Server the script ~write-x11-keyboard-config~ reads the keyboard configuration from ~/etc/default/keyboard~ when starting ~x@.service~ and writes the file ~/etc/X11/xorg.conf.d/00-keyboard.conf~ (because systemd for Ubuntu (and Debian) has been patched not to create ~/etc/X11/xorg.conf.d/00-keyboard.conf~ according to the ~localectl~ settings).
To prevent stopping the X-server when vdr is running, additional dependencies are set up - see the drop-in rules created in ~/etc/systemd/system/vdr.service.d/~. To prevent stopping the X-server when vdr is running, additional dependencies are set up - see the drop-in rules created in ~/etc/systemd/system/vdr.service.d/~.
@@ -1681,18 +1456,14 @@ b'\xde\xad\xbe\xef'
*** default variables *** default variables
*** tasks *** tasks
**** main.yml
#+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/main.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/main.yml :mkdirp yes :padline no
--- ---
# file: roles/yavdr-xorg/tasks/main.yml # file: roles/yavdr-xorg/tasks/main.yml
- import_tasks: setup-xorg.yml - import_tasks: setup-xorg.yml tags=install,update
tags: [install,update] - import_tasks: detect-xorg.yml tags=xorg:detect,install
- import_tasks: detect-xorg.yml - import_tasks: desktop-session.yml tags=install,update
tags: [xorg.detect,install]
- import_tasks: desktop-session.yml
tags: [install,update]
#+END_SRC #+END_SRC
**** setup-xorg.yml
#+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/setup-xorg.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/setup-xorg.yml :mkdirp yes :padline no
--- ---
# file: roles/yavdr-xorg/tasks/setup-xorg.yml # file: roles/yavdr-xorg/tasks/setup-xorg.yml
@@ -1704,7 +1475,6 @@ b'\xde\xad\xbe\xef'
- "/etc/systemd/system/x@.service.d/" - "/etc/systemd/system/x@.service.d/"
- "/etc/systemd/system/vdr.service.d/" - "/etc/systemd/system/vdr.service.d/"
- "/etc/systemd/system/user@{{ vdr.uid }}.service.d/" - "/etc/systemd/system/user@{{ vdr.uid }}.service.d/"
- "/etc/X11/xorg.conf.d/"
- name: systemd-drop-in | add dependency to X-server for vdr.service - name: systemd-drop-in | add dependency to X-server for vdr.service
template: template:
@@ -1721,11 +1491,6 @@ b'\xde\xad\xbe\xef'
src: templates/systemd/vdr-environ.j2 src: templates/systemd/vdr-environ.j2
dest: /etc/systemd/system/vdr.service.d/load-environ.conf dest: /etc/systemd/system/vdr.service.d/load-environ.conf
- name: systemd-drop-in | start vdr.service after network-online.target
template:
src: templates/systemd/network-online.j2
dest: /etc/systemd/system/vdr.service.d/network-online.conf
- name: systemd-drop-in | user@{{ vdr.uid }}.service depends on x@vt7.service - name: systemd-drop-in | user@{{ vdr.uid }}.service depends on x@vt7.service
template: template:
src: templates/user@666.service.d/x-dependency.conf.j2 src: templates/user@666.service.d/x-dependency.conf.j2
@@ -1734,7 +1499,7 @@ b'\xde\xad\xbe\xef'
- name: vdr-config | start softhddevice detached and set audio to pulseaudio - name: vdr-config | start softhddevice detached and set audio to pulseaudio
lineinfile: lineinfile:
path: /etc/vdr/conf.avail/softhddevice.conf path: /etc/vdr/conf.avail/softhddevice.conf
line: '{{ item }}' line: '{{ item }}ys
with_items: with_items:
- '-D' - '-D'
# - '-a pulse' # do we need this with our existing asound.conf? # - '-a pulse' # do we need this with our existing asound.conf?
@@ -1763,26 +1528,8 @@ b'\xde\xad\xbe\xef'
- read-edid - read-edid
- tmux - tmux
- vdr-plugin-desktop - vdr-plugin-desktop
- vdr-plugin-osd2web
- feh
#- yavdr-xorg #- yavdr-xorg
- name: download yavdr logo
block:
- file:
dest: '/usr/share/yavdr/images'
state: directory
- get_url:
url: 'https://github.com/yavdr/yavdr-base/raw/master/images/yavdr_logo.png'
dest: '/usr/share/yavdr/images/yavdr_logo.png'
- name: command | write keyboard configuration to /etc/X11/xorg.conf.d/00-keyboard.conf
command: write-x11-keyboard-config
creates: /etc/X11/xorg.conf.d/00-keyboard.conf
# NOTE: write-x11-keyboard-config is in the xlogin package
# Ubuntu's systemd is patched, so it does not create the file automatically
- name: apt | install desktop programs - name: apt | install desktop programs
apt: apt:
name: '{{ item }}' name: '{{ item }}'
@@ -1792,7 +1539,7 @@ b'\xde\xad\xbe\xef'
- firefox - firefox
- kiosk-browser - kiosk-browser
#+END_SRC #+END_SRC
**** detect-xorg.yml
#+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/detect-xorg.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/detect-xorg.yml :mkdirp yes :padline no
--- ---
# file: roles/yavdr-xorg/tasks/detect-xorg.yml # file: roles/yavdr-xorg/tasks/detect-xorg.yml
@@ -1824,40 +1571,7 @@ b'\xde\xad\xbe\xef'
name: x@vt7.service name: x@vt7.service
state: stopped state: stopped
- name: Workaround for wrong connector names on first run - name: "wait a little bit before starting x-verbose@vt7.service (needed?)"
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
tags: first_run
- 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: "wait a little bit, so udev has some time to reapply rules (needed?)"
wait_for: wait_for:
timeout: 3 timeout: 3
@@ -1909,7 +1623,7 @@ b'\xde\xad\xbe\xef'
- nvidia_detected - nvidia_detected
#+END_SRC #+END_SRC
**** desktop-session.yml
#+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/desktop-session.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/yavdr-xorg/tasks/desktop-session.yml :mkdirp yes :padline no
--- ---
# file: roles/yavdr-xorg/tasks/desktop-session.yml # file: roles/yavdr-xorg/tasks/desktop-session.yml
@@ -1934,14 +1648,6 @@ b'\xde\xad\xbe\xef'
owner: '{{ vdr.user }}' owner: '{{ vdr.user }}'
group: '{{ vdr.group }}' group: '{{ vdr.group }}'
- name: "expand template for vdr's .Xresources"
template:
src: 'templates/.Xresources.j2'
dest: '{{ vdr.home }}/.Xresources'
mode: 0644
owner: '{{ vdr.user }}'
group: '{{ vdr.group }}'
- name: expand template for openbox autostart - name: expand template for openbox autostart
template: template:
src: 'templates/openbox/autostart.j2' src: 'templates/openbox/autostart.j2'
@@ -2000,15 +1706,6 @@ b'\xde\xad\xbe\xef'
src: templates/systemd/user/osd2web.service.j2 src: templates/systemd/user/osd2web.service.j2
dest: '{{ vdr.home }}/.config/systemd/user/osd2web.service' dest: '{{ vdr.home }}/.config/systemd/user/osd2web.service'
- name: create irexec configuration for the session
block:
- template:
src: templates/systemd/user/irexec.service.j2
dest: '{{ vdr.home }}/.config/systemd/user/irexec.service'
- template:
src: templates/.lircrc.j2
dest: '{{ vdr.home }}/.lircrc'
- name: link /usr/bin/start-desktop to /var/lib/vdr/plugins/desktop/starter - name: link /usr/bin/start-desktop to /var/lib/vdr/plugins/desktop/starter
file: file:
src: /usr/bin/start-desktop src: /usr/bin/start-desktop
@@ -2054,7 +1751,8 @@ KillMode=mixed
***** Drop-in snippet for vdr.service ***** Drop-in snippet for vdr.service
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/vdr-xorg.conf :mkdirp yes :padline no #+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/vdr-xorg.conf :mkdirp yes :padline no
{{ ansible_managed_file | comment }} # file: roles/yavdr-xorg/templates/vdr-xorg.conf
# {{ ansible_managed_file }}
[Unit] [Unit]
After=x@vt7.service After=x@vt7.service
Wants=x@vt7.service Wants=x@vt7.service
@@ -2063,7 +1761,7 @@ Wants=x@vt7.service
***** .xinitrc ***** .xinitrc
#+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/.xinitrc.j2 :mkdirp yes :padline no #+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/.xinitrc.j2 :mkdirp yes :padline no
#!/bin/bash #!/bin/bash
{{ ansible_managed_file | comment }} # {{ ansible_managed_file }}
exec openbox-session exec openbox-session
#+END_SRC #+END_SRC
***** xorg.conf ***** xorg.conf
@@ -2140,9 +1838,7 @@ Section "Screen"
Option "ConnectedMonitor" "{{ xorg.primary.connector }}{% if xorg.secondary is defined %}, {{ xorg.secondary.connector }}{% endif %}" Option "ConnectedMonitor" "{{ xorg.primary.connector }}{% if xorg.secondary is defined %}, {{ xorg.secondary.connector }}{% endif %}"
Option "UseDisplayDevice" "{{ xorg.primary.connector }}" Option "UseDisplayDevice" "{{ xorg.primary.connector }}"
Option "CustomEDID" "{{ xorg.primary.connector }}:/etc/X11/edid.{{ xorg.primary.connector }}.bin" Option "CustomEDID" "{{ xorg.primary.connector }}:/etc/X11/edid.{{ xorg.primary.connector }}.bin"
Option "metamodes" "{{ xorg.primary.connector }}: {{ xorg.primary.mode }} +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}" Option "metamodes" "{{ xorg.primary.connector }}: {{ xorg.primary.mode }} +0+0"
Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on"
Option "SLI" "Off" Option "SLI" "Off"
Option "MultiGPU" "Off" Option "MultiGPU" "Off"
Option "BaseMosaic" "off" Option "BaseMosaic" "off"
@@ -2181,9 +1877,7 @@ Section "Screen"
Option "ConnectedMonitor" "{{ xorg.secondary.connector }}" Option "ConnectedMonitor" "{{ xorg.secondary.connector }}"
Option "UseDisplayDevice" "{{ xorg.secondary.connector }}" Option "UseDisplayDevice" "{{ xorg.secondary.connector }}"
Option "CustomEDID" "{{ xorg.secondary.connector }}:/etc/X11/edid.{{ xorg.secondary.connector }}.bin" Option "CustomEDID" "{{ xorg.secondary.connector }}:/etc/X11/edid.{{ xorg.secondary.connector }}.bin"
Option "metamodes" "{{ xorg.secondary.connector }}: {{ xorg.secondary.mode }} +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}" Option "metamodes" "{{ xorg.secondary.connector }}: {{ xorg.secondary.mode }} +0+0"
Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on"
Option "SLI" "Off" Option "SLI" "Off"
Option "MultiGPU" "Off" Option "MultiGPU" "Off"
Option "BaseMosaic" "off" Option "BaseMosaic" "off"
@@ -2389,37 +2083,12 @@ Section "Screen"
EndSection EndSection
{% endif %} {% endif %}
#+END_SRC #+END_SRC
***** .Xresources
#+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/.Xresources.j2 :mkdirp yes :padline no
xterm*background: Black
xterm*foreground: grey
XTerm*locale: true
XTerm*metaSendsEscape: true
XTerm*eightBitInput: false
XTerm*backarrowKey: false
XTerm*ttyModes: erase ^?
Xterm*saveLines: 4096
XTerm.vt100.metaSendsEscape: true
XTerm.vt100.geometry: 80x32
XTerm.vt100.renderFont: true
xterm*faceName: xft:DejaVu Sans Mono
xterm*faceSize: 14
xterm*renderFont: true
XTerm.vt100.faceName: xft:DejaVu Sans Mono:size=12:antialias=false
XTerm.vt100.font: 7x13
#+END_SRC
**** vdr **** vdr
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/systemd/vdr-environ.j2 #+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/systemd/vdr-environ.j2
[Service] [Service]
Environment=XDG_RUNTIME_DIR=/run/user/{{ vdr.uid }}/ Environment=XDG_RUNTIME_DIR=/run/user/{{ vdr.uid }}/
EnvironmentFile=-/var/lib/vdr/.session-env EnvironmentFile=-/var/lib/vdr/.session-env
#+END_SRC #+END_SRC
#+BEGIN_SRC conf :tangle roles/yavdr-xorg/templates/systemd/network-online.j2
[Unit]
After=network-online.target
#+END_SRC
**** Systemd User Session **** Systemd User Session
***** yavdr-desktop.target ***** yavdr-desktop.target
#+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/systemd/user/yavdr-desktop.target.j2 :mkdirp yes :padline no #+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/systemd/user/yavdr-desktop.target.j2 :mkdirp yes :padline no
@@ -2456,7 +2125,6 @@ ConditionFileNotEmpty=%h/.second_display
PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
EnvironmentFile=%h/.second_display EnvironmentFile=%h/.second_display
ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml
ExecStartPost=/bin/bash %h/.fehbg
[Install] [Install]
WantedBy=yavdr-desktop.target WantedBy=yavdr-desktop.target
@@ -2472,7 +2140,7 @@ ConditionFileNotEmpty=%h/.second_display
[Service] [Service]
EnvironmentFile=%h/.second_display EnvironmentFile=%h/.second_display
PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
ExecStart=/usr/bin/on_vdr -o -c 'kiosk-browser "http://localhost:4444/skins/horchiTft/index.html?theme=bluecd&onlyView=1"' ExecStart=/usr/bin/on_vdr -o -c 'kiosk-browser "http://localhost:4444/skins/horchiTft/index.html?theme=blue&onlyView=1"'
KillSignal=SIGINT KillSignal=SIGINT
[Install] [Install]
@@ -2506,28 +2174,6 @@ RemainAfterExit=True
[Install] [Install]
WantedBy=default.target WantedBy=default.target
#+END_SRC #+END_SRC
**** irexec
irexec.service starts irexec for the user session
#+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/systemd/user/irexec.service.j2 :mkdirp yes :padline no
[Unit]
Description=LIRC command handler
[Service]
Type=simple
ExecStart=/usr/bin/irexec %h/.lircrc
[Install]
WantedBy=yavdr-desktop.target
#+END_SRC
~/.lircrc contains the irexec configuration
#+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/.lircrc.j2 :mkdirp yes :padline no
begin
prog = irexec
button = KEY_HOME
config = frontend-dbus-send switchbetween kodi vdr
end
#+END_SRC
**** openbox **** openbox
***** autostart ***** autostart
#+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/openbox/autostart.j2 :mkdirp yes :shebang #!/bin/bash #+BEGIN_SRC shell :tangle roles/yavdr-xorg/templates/openbox/autostart.j2 :mkdirp yes :shebang #!/bin/bash
@@ -2535,13 +2181,11 @@ end
env | grep "DISPLAY\|DBUS_SESSION_BUS_ADDRESS\|XDG_RUNTIME_DIR" > ~/.session-env env | grep "DISPLAY\|DBUS_SESSION_BUS_ADDRESS\|XDG_RUNTIME_DIR" > ~/.session-env
systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
feh --bg-center "/usr/share/yavdr/images/yavdr_logo.png"
enabled_services=( enabled_services=(
"tmux.service" "detect-second-display.service" "tmux.service" "detect-second-display.service"
"openbox-second.service" "osd2web.service" "openbox-second.service" "osd2web.service"
"yavdr-frontend.service" "pulseaudio.socket" "yavdr-frontend.service" "pulseaudio.socket"
"pulseaudio.service" "wm-exit.service" "irexec.service") "pulseaudio.service" "wm-exit.service")
disabled_services=() disabled_services=()
# enable configured services for the user session # enable configured services for the user session
@@ -2619,7 +2263,7 @@ systemctl --user isolate yavdr-desktop.target
S: shade (roll up/down) S: shade (roll up/down)
D: omnipresent (on all desktops). D: omnipresent (on all desktops).
--> -->
<keepBorder>no</keepBorder> <keepBorder>yes</keepBorder>
<animateIconify>yes</animateIconify> <animateIconify>yes</animateIconify>
<font place="ActiveWindow"> <font place="ActiveWindow">
<name>sans</name> <name>sans</name>
@@ -2886,6 +2530,22 @@ systemctl --user isolate yavdr-desktop.target
<direction>down</direction> <direction>down</direction>
</action> </action>
</keybind> </keybind>
<!-- Keybindings for running applications -->
<keybind key="W-e">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Konqueror</name>
</startupnotify>
<command>kfmclient openProfile filemanagement</command>
</action>
</keybind>
<!-- Launch scrot when Print is pressed -->
<keybind key="Print">
<action name="Execute">
<command>scrot</command>
</action>
</keybind>
</keyboard> </keyboard>
<mouse> <mouse>
<dragThreshold>1</dragThreshold> <dragThreshold>1</dragThreshold>
@@ -3345,27 +3005,21 @@ systemctl --user isolate yavdr-desktop.target
<applications> <applications>
<application title="softhddevice"> <application title="softhddevice">
<decor>no</decor> <decor>no</decor>
<maximized>yes</maximized> <maximized>true</maximized>
<!--<skip_pager>yes</skip_pager>-->
<skip_taskbar>no</skip_taskbar>
</application>
<application class="VDR">
<decor>no</decor>
<maximized>yes</maximized>
<!--<skip_pager>yes</skip_pager>--> <!--<skip_pager>yes</skip_pager>-->
<skip_taskbar>no</skip_taskbar> <skip_taskbar>no</skip_taskbar>
</application> </application>
<application title="browser"> <application title="browser">
<decor>no</decor> <decor>no</decor>
<maximized>yes</maximized> <maximized>true</maximized>
<!--<skip_pager>yes</skip_pager>--> <!--<skip_pager>yes</skip_pager>-->
<skip_taskbar>no</skip_taskbar> <skip_taskbar>yes</skip_taskbar>
</application> </application>
<application title="osd2Web"> <application title="osd2Web">
<decor>no</decor> <decor>no</decor>
<maximized>yes</maximized> <maximized>true</maximized>
<!--<skip_pager>yes</skip_pager>--> <!--<skip_pager>yes</skip_pager>-->
<skip_taskbar>no</skip_taskbar> <skip_taskbar>yes</skip_taskbar>
</application> </application>
</applications> </applications>
</openbox_config> </openbox_config>
@@ -3575,77 +3229,6 @@ This role installs the guest additions for virtualbox guests on Ubuntu 16.04
- ansible_distribution == "Ubuntu" - ansible_distribution == "Ubuntu"
- ansible_distribution_version == "16.04" - ansible_distribution_version == "16.04"
#+END_SRC #+END_SRC
** autoinstall-atric-usb
*** dependencies
#+BEGIN_SRC yaml :tangle roles/autoinstall-atric-usb/meta/main.yml :padline no
---
dependencies:
- { role: yavdr-remote }
#+END_SRC
*** tasks
#+BEGIN_SRC yaml :tangle roles/autoinstall-atric-usb/tasks/main.yml :padline no
---
# file roles/autoinstall-atric-usb/tasks/main.yml
- name: install and configure Atric IR-WakeupUSB
block:
- name: apt | install lirc-drv-irman
apt:
name: lirc-drv-irman
state: present
tags:
- packages
- name: write lirc configuration
template:
src: templates/lirc_options.conf.j2
dest: /etc/lirc/lirc_options.conf
tags:
- config
- systemd
- name: enable lircd, eventlircd, lircd2uinput
systemd:
name: '{{ item }}'
enabled: yes
state: started
masked: no
daemon_reload: yes
with_items:
- eventlircd.socket
- eventlircd.service
- lircd2uinput.service
- lircd.service
tags:
- systemd
when: '"04d8:f844" in usb'
#+END_SRC
*** templates
#+BEGIN_SRC conf :tangle roles/autoinstall-atric-usb/templates/lirc_options.conf.j2 :padline no
{{ ansible_managed_file | comment }}
[lircd]
nodaemon = False
driver = irman
device = /dev/irman
output = /var/run/lirc/lircd0
pidfile = /var/run/lirc/lircd0.pid
plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
#loglevel = 6
#release = true
#release_suffix = _EVUP
#logfile = ...
#driver-options = ...
[lircmd]
uinput = False
nodaemon = False
#+END_SRC
** autoinstall-satip ** autoinstall-satip
If a Sat>IP Server responds to a discovery request, the package vdr-plugin-satip is installed. If a Sat>IP Server responds to a discovery request, the package vdr-plugin-satip is installed.
*** tasks *** tasks
@@ -4475,9 +4058,9 @@ options:
default: ":0" default: ":0"
description: description:
- the DISPLAY variable to use when calling xrandr - the DISPLAY variable to use when calling xrandr
preferred_outputs: preferred_outpus:
required: False required: False
default: ["HDMI", "DP", "DVI", "VGA", "TV"] default: ["HDMI", "DP", "DVI", "VGA", "TV": 0]
description: description:
- ranking of the preferred display connectors - ranking of the preferred display connectors
preferred_refreshrates: preferred_refreshrates:

View File

@@ -3,11 +3,10 @@ ansible playbooks for yaVDR
## Usage: ## Usage:
On a Ubuntu Server 18.04.x (or minimal) Installation run the following commands: On a Ubuntu Server 16.04.x Installation run the following commands:
``` ```
sudo apt-get install git sudo apt-get install git
git clone https://github.com/yavdr/yavdr-ansible git clone https://github.com/yavdr/yavdr-ansible
cd yavdr-ansible cd yavdr-ansible
git checkout bionic
sudo ./install-yavdr.sh sudo ./install-yavdr.sh
``` ```

View File

@@ -1,3 +0,0 @@
[defaults]
callback_plugins = plugins/callbacks
callback_whitelist = auto_tags

View File

@@ -1,34 +0,0 @@
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'yavdr'
}
import gettext
from ansible.errors import AnsibleFilterError
from ansible.utils import helpers
def translate_yavdr(text):
gettext.textdomain('yavdr')
try:
return gettext.gettext(text)
except:
return text
# ---- Ansible filters ----
class FilterModule(object):
''' URI filter '''
def filters(self):
return {
'translate': translate_yavdr
}

View File

@@ -2,15 +2,16 @@
# file: group_vars/all # file: group_vars/all
# this is the standard text to put in templates # this is the standard text to put in templates
ansible_managed_file: "*** YAVDR: ANSIBLE MANAGED FILE ***\norigin: {file}" ansible_managed_file: "*** YAVDR: ANSIBLE MANAGED FILE ***"
branch: experimental branch: unstable
ppa_owner: 'ppa:yavdr' ppa_owner: 'ppa:yavdr'
# add the following PPAs # add the following PPAs
repositories: repositories:
- '{{ ppa_owner }}/{{branch}}-main' - '{{ ppa_owner }}/main'
- '{{ ppa_owner }}/unstable-main'
- '{{ ppa_owner }}/{{branch}}-vdr' - '{{ ppa_owner }}/{{branch}}-vdr'
#- '{{ ppa_owner }}/{{branch}}-yavdr' - '{{ ppa_owner }}/{{branch}}-yavdr'
#- '{{ ppa_owner }}/{{branch}}-kodi' - '{{ ppa_owner }}/{{branch}}-kodi'
# properties of the user vdr and vdr-related options # properties of the user vdr and vdr-related options
vdr: vdr:
user: vdr user: vdr
@@ -51,11 +52,10 @@ extra_packages:
- tree - tree
- vim - vim
- w-scan - w-scan
- plymouth-theme-yavdr-logo
frontend: vdr frontend: vdr
#system: #system:
# shutdown: poweroff # shutdown: poweroff
wakeup_method: acpiwakeup wakeup_method: acpiwakeup
grub: grub:
timeout: 0 timeout: 0
boot_options: quiet splash boot_options: quiet nosplash

View File

@@ -1,16 +1,16 @@
#!/bin/bash #!/bin/bash
if (( $EUID != 0 )); then if (( $EUID != 0 )); then
echo "This script must be run using sudo -H or as root" echo "This script must be run using sudo or as root"
exit exit
fi fi
apt-get -y install software-properties-common apt-get -y install software-properties-common
# Add repository for ansible # Add repository for ansible
add-apt-repository -y ppa:yavdr/experimental-main add-apt-repository -y ppa:ansible/ansible
# update packages # update packages
apt-get update apt-get update
# install required packages # install required packages
apt-get -y install --no-install-recommends ansible apt-get -y install --no-install-recommends ansible
# TODO: run ansible on local host # TODO: run ansible on local host
ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags="all" ansible-playbook yavdr07.yml -b -i 'localhost_inventory' --connection=local --tags=install

View File

@@ -23,9 +23,9 @@ options:
default: ":0" default: ":0"
description: description:
- the DISPLAY variable to use when calling xrandr - the DISPLAY variable to use when calling xrandr
preferred_outputs: preferred_outpus:
required: False required: False
default: ["HDMI", "DP", "DVI", "VGA", "TV"] default: ["HDMI", "DP", "DVI", "VGA", "TV": 0]
description: description:
- ranking of the preferred display connectors - ranking of the preferred display connectors
preferred_refreshrates: preferred_refreshrates:

View File

@@ -1,48 +0,0 @@
"""
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin:
ansible-playbook --tags=some_tag provision.yml
Here, the "some_tag" tag was generated dynamically (assuming there is a "some_tag" role).
Installation:
1. Place this file in `plugins/callbacks/auto_tags.py` (relative to your playbook root)
2. Add the following two lines to your `ansible.cfg` file:
callback_plugins = plugins/callbacks
callback_whitelist = auto_tags
"""
from __future__ import print_function
from ansible.plugins.callback import CallbackBase
class CallbackModule(CallbackBase):
"""
Ansible supports several types of plugins. We are using the *callback* type here, since
it seemed the best choice for our use case, because it allows you to hook into the start
of a playbook.
"""
def v2_playbook_on_start(self, playbook):
"""
Dynamically add a tag of the same name to each role.
Note: Plays, roles, task_blocks and tasks can have tags.
"""
plays = playbook.get_plays()
# Note: Although identical roles are shared between plays we cannot deduplicate them,
# since Ansible treats them as different objects internally
roles = [role for play in plays for role in play.get_roles()]
# Note: Tags for roles are set dynamically in `_load_role_data` instead of in __init__
# I don't know why they do that.
for role in roles:
role_name = role._role_name
if role_name not in role.tags:
role.tags += [role_name]

View File

@@ -1,3 +0,0 @@
---
dependencies:
- { role: yavdr-remote }

View File

@@ -1,36 +0,0 @@
---
# file roles/autoinstall-atric-usb/tasks/main.yml
- name: install and configure Atric IR-WakeupUSB
block:
- name: apt | install lirc-drv-irman
apt:
name: lirc-drv-irman
state: present
tags:
- packages
- name: write lirc configuration
template:
src: templates/lirc_options.conf.j2
dest: /etc/lirc/lirc_options.conf
tags:
- config
- systemd
- name: enable lircd, eventlircd, lircd2uinput
systemd:
name: '{{ item }}'
enabled: yes
state: started
masked: no
daemon_reload: yes
with_items:
- eventlircd.socket
- eventlircd.service
- lircd2uinput.service
- lircd.service
tags:
- systemd
when: '"04d8:f844" in usb'

View File

@@ -1,21 +0,0 @@
{{ ansible_managed_file | comment }}
[lircd]
nodaemon = False
driver = irman
device = /dev/irman
output = /var/run/lirc/lircd0
pidfile = /var/run/lirc/lircd0.pid
plugindir = /usr/lib/x86_64-linux-gnu/lirc/plugins
permission = 666
allow-simulate = No
repeat-max = 600
#loglevel = 6
#release = true
#release_suffix = _EVUP
#logfile = ...
#driver-options = ...
[lircmd]
uinput = False
nodaemon = False

View File

@@ -5,7 +5,15 @@
block: block:
- name: add firmware files for DVBSky if a card has been detected - name: add firmware files for DVBSky if a card has been detected
set_fact: 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'] dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-m88ds3103.fw']"
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-m88rs6000.fw']"
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-si2168-a20-01.fw']"
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-si2168-a30-01.fw']"
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-demod-si2168-b40-01.fw']"
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-fe-ds300x.fw']"
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-fe-ds3103.fw']"
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-fe-rs6000.fw']"
dvbsky_firmware_files: "{{dvbsky_firmware_files}} + ['dvb-tuner-si2158-a20-01.fw']"
when: when:
- '"1ade:3038" in pci' - '"1ade:3038" in pci'
when: when:

View File

@@ -5,8 +5,6 @@
modules: True modules: True
gpus: True gpus: True
acpi_power_modes: True acpi_power_modes: True
tags:
- always
- debug: - debug:
var: '{{ item }}' var: '{{ item }}'
@@ -21,10 +19,3 @@
- intel_detected - intel_detected
- amd_detected - amd_detected
- virtualbox_detected - virtualbox_detected
- name: known vdr output plugins
set_fact:
vdr_output_plugins:
- softhddevice
- xineliboutput
- xine

View File

@@ -8,4 +8,4 @@
with_items: with_items:
- kodi - kodi
- kodi-pvr-vdr-vnsi - kodi-pvr-vdr-vnsi
- kodi-eventclients-kodi-send # for ubuntu packages, team-xbmc uses "kodi-eventclients-xbmc-send for some reason - kodi-eventclients-xbmc-send

View File

@@ -6,7 +6,7 @@ Type=simple
PassEnvironment=DISPLAY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS PassEnvironment=DISPLAY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
ExecStartPre=-/usr/bin/set-kodi-display ExecStartPre=-/usr/bin/set-kodi-display
ExecStart=/usr/bin/kodi -l /run/lirc/lircd ExecStart=/usr/bin/kodi -l /run/lirc/lircd
ExecStop=/bin/bash -c "/usr/bin/kodi-send --action=QUIT; while ps -p $MAINPID -o comm=; do sleep .25; done" ExecStop=/bin/bash -c "/usr/bin/kodi-send --action=QUIT; while /usr/bin/pgrep kodi; do sleep 1; done; sleep 1"
TimeoutStopSec=10 TimeoutStopSec=10
SuccessExitStatus=0 127 SuccessExitStatus=0 127
Restart=on-failure Restart=on-failure

View File

@@ -5,8 +5,6 @@
repo: 'ppa:graphics-drivers/ppa' repo: 'ppa:graphics-drivers/ppa'
state: present state: present
update_cache: yes update_cache: yes
tags:
- ppa
- name: install nvidia-387 and other required packages - name: install nvidia-387 and other required packages
apt: apt:
@@ -16,5 +14,3 @@
with_items: with_items:
- nvidia-387 - nvidia-387
- nvidia-settings - nvidia-settings
tags:
- packages

View File

@@ -1,6 +1,6 @@
--- ---
- name: apt | install pulseaudio, pavucontrol and vdr-plugin-pulsecontrol - name: apt | install pulseaudio and pavucontrol
apt: apt:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
@@ -8,7 +8,6 @@
with_items: with_items:
- pulseaudio - pulseaudio
- pavucontrol - pavucontrol
- vdr-plugin-pulsecontrol
- name: create /etc/asound.conf with pulseaudio as default device - name: create /etc/asound.conf with pulseaudio as default device
template: template:

View File

@@ -30,10 +30,11 @@
blockinfile: blockinfile:
dest: /etc/vdr/conf.d/04-vdr-hide-first-recordinglevel.conf dest: /etc/vdr/conf.d/04-vdr-hide-first-recordinglevel.conf
create: true create: true
state: "{{ 'present' if vdr.hide_first_recording_level else 'absent' }}"
block: | block: |
[vdr] [vdr]
--hide-first-recording-level --hide-first-recording-level
when:
vdr.hide_first_recording_level
- name: create local dir in recdir - name: create local dir in recdir
file: file:

View File

@@ -10,8 +10,6 @@
state: present state: present
update_cache: yes update_cache: yes
with_items: '{{ repositories }}' with_items: '{{ repositories }}'
tags:
- ppa
- name: run apt-get dist-upgrade - name: run apt-get dist-upgrade
apt: apt:

View File

@@ -1,7 +1,7 @@
--- ---
# this playbook sets up network services for a yaVDR installation # this playbook sets up network services for a yaVDR installation
- name: apt | install packages for network services - name: apt |install packages for network services
apt: apt:
name: '{{ item }}' name: '{{ item }}'
state: present state: present

View File

@@ -1,30 +1,20 @@
--- ---
# This role is used to set up the yaVDR remote control configuration. # This role is used to set up the yaVDR remote control configuration.
- name: apt | install packages for remote support - name: apt | install yavdr-remote
apt: apt:
name: '{{ item }}' name: yavdr-remote
state: present state: present
with_items:
- yavdr-remote
- lirc
- eventlircd
- lircd2uinput
tags:
- packages
- name: add systemd drop-in for lircd to use lircd2uinput - name: apt | install eventlircd
block: apt:
- name: create directory /etc/systemd/system/lircd.service.d/ name: eventlircd
file: state: present
path: /etc/systemd/system/lircd.service.d/
state: directory - name: apt | install lirc
- name: expand template for /etc/systemd/system/lircd.service.d/lircd2uinput.conf apt:
template: name: lirc
src: templates/lircd.service.d/lircd2uinput.conf.j2 state: present
dest: /etc/systemd/system/lircd.service.d/lircd2uinput.conf
tags:
- config
- name: stop, mask and disable lircd.socket, lircd.service and lircd-uinput.service # (the default lirc configuration conflicts with eventlircd) - name: stop, mask and disable lircd.socket, lircd.service and lircd-uinput.service # (the default lirc configuration conflicts with eventlircd)
systemd: systemd:
@@ -37,21 +27,18 @@
- lircd.socket - lircd.socket
- lircd-uinput.service - lircd-uinput.service
ignore_errors: yes ignore_errors: yes
tags:
- systemd
- name: configure vdr to read from a lircd-compatible socket - name: configure vdr to read from a lircd-compatible socket
template: template:
src: templates/03-vdr-lirc.conf.j2 src: templates/03-vdr-lirc.conf.j2
dest: /etc/vdr/conf.d/03-vdr-lirc.conf dest: /etc/vdr/conf.d/03-vdr-lirc.conf
notify: ['Restart VDR'] notify: ['Restart VDR']
tags:
- config
- name: expand template for /etc/rc_maps.cfg # TODO: upload lircd2uinput package to PPA
template: #- name: install lircd2uinput
src: templates/rc_maps.cfg.j2 # tag: install
dest: /etc/rc_maps.cfg # apt:
notify: ['Trigger Udev'] # name: lircd2uinput
tags: # state: present
- config # when:
# install_eventlircd is defined and install_eventlircd

View File

@@ -1,3 +0,0 @@
[Service]
ExecStartPost=/usr/bin/lircd2uinput-add /var/run/lirc/lircd0
ExecStopPost=/usr/bin/lircd2uinput-remove /var/run/lirc/lircd0

View File

@@ -1,182 +0,0 @@
#
# Keymaps table
#
# This table creates an association between a keycode file and a kernel
# driver. It can be used to automatically override a keycode definition.
#
# Although not yet tested, it is mented to be added at udev.
#
# To use, you just need to run:
# ./ir-keytable -a
#
# Or, if the remote is not the first device:
# ./ir-keytable -a -s rc1 # for RC at rc1
#
# Format:
# driver - name of the driver provided via uevent - use * for any driver
# table - RC keymap table, provided via uevent - use * for any table
# file - file name. If directory is not specified, it will default to
# /etc/rc_keymaps.
# For example:
# driver table file
# cx8800 * ./keycodes/rc5_hauppauge_new
# * rc-avermedia-m135a-rm-jx ./keycodes/kworld_315u
# saa7134 rc-avermedia-m135a-rm-jx ./keycodes/keycodes/nec_terratec_cinergy_xs
# em28xx * ./keycodes/kworld_315u
# * * ./keycodes/rc5_hauppauge_new
# Table to automatically load the rc maps for the bundled IR's provided with the
# devices supported by the linux kernel
#driver table file
* rc-adstech-dvb-t-pci adstech_dvb_t_pci
* rc-alink-dtu-m alink_dtu_m
* rc-anysee anysee
* rc-apac-viewcomp apac_viewcomp
* rc-asus-pc39 asus_pc39
* rc-asus-ps3-100 asus_ps3_100
* rc-ati-tv-wonder-hd-600 ati_tv_wonder_hd_600
* rc-ati-x10 ati_x10
* rc-avermedia-a16d avermedia_a16d
* rc-avermedia-cardbus avermedia_cardbus
* rc-avermedia-dvbt avermedia_dvbt
* rc-avermedia-m135a avermedia_m135a
* rc-avermedia-m733a-rm-k6 avermedia_m733a_rm_k6
* rc-avermedia-rm-ks avermedia_rm_ks
* rc-avermedia avermedia
* rc-avertv-303 avertv_303
* rc-azurewave-ad-tu700 azurewave_ad_tu700
* rc-behold-columbus behold_columbus
* rc-behold behold
* rc-budget-ci-old budget_ci_old
* rc-cec cec
* rc-cinergy-1400 cinergy_1400
* rc-cinergy cinergy
* rc-delock-61959 delock_61959
* rc-dib0700-nec dib0700_nec
* rc-dib0700-rc5 dib0700_rc5
* rc-digitalnow-tinytwin digitalnow_tinytwin
* rc-digittrade digittrade
* rc-dm1105-nec dm1105_nec
* rc-dntv-live-dvb-t dntv_live_dvb_t
* rc-dntv-live-dvbt-pro dntv_live_dvbt_pro
* rc-dtt200u dtt200u
* rc-dvbsky dvbsky
* rc-em-terratec em_terratec
* rc-encore-enltv-fm53 encore_enltv_fm53
* rc-encore-enltv encore_enltv
* rc-encore-enltv2 encore_enltv2
* rc-evga-indtube evga_indtube
* rc-eztv eztv
* rc-flydvb flydvb
* rc-flyvideo flyvideo
* rc-fusionhdtv-mce fusionhdtv_mce
* rc-gadmei-rm008z gadmei_rm008z
* rc-genius-tvgo-a11mce genius_tvgo_a11mce
* rc-gotview7135 gotview7135
* rc-hauppauge hauppauge
#* rc-imon-mce imon_mce
#* rc-imon-pad imon_pad
* rc-iodata-bctv7e iodata_bctv7e
* rc-it913x-v1 it913x_v1
* rc-it913x-v2 it913x_v2
* rc-kaiomy kaiomy
* rc-kworld-315u kworld_315u
* rc-kworld-pc150u kworld_pc150u
* rc-kworld-plus-tv-analog kworld_plus_tv_analog
* rc-leadtek-y04g0051 leadtek_y04g0051
* rc-lme2510 lme2510
* rc-manli manli
* rc-medion-x10-digitainer medion_x10_digitainer
* rc-medion-x10-or2x medion_x10_or2x
* rc-medion-x10 medion_x10
* rc-msi-digivox-ii msi_digivox_ii
* rc-msi-digivox-iii msi_digivox_iii
* rc-msi-tvanywhere-plus msi_tvanywhere_plus
* rc-msi-tvanywhere msi_tvanywhere
* rc-nebula nebula
* rc-nec-terratec-cinergy-xs nec_terratec_cinergy_xs
* rc-norwood norwood
* rc-npgtech npgtech
* rc-pctv-sedna pctv_sedna
* rc-pinnacle-color pinnacle_color
* rc-pinnacle-grey pinnacle_grey
* rc-pinnacle-pctv-hd pinnacle_pctv_hd
* rc-pixelview-002t pixelview_002t
* rc-pixelview-mk12 pixelview_mk12
* rc-pixelview-new pixelview_new
* rc-pixelview pixelview
* rc-powercolor-real-angel powercolor_real_angel
* rc-proteus-2309 proteus_2309
* rc-purpletv purpletv
* rc-pv951 pv951
* rc-real-audio-220-32-keys real_audio_220_32_keys
* rc-reddo reddo
* rc-snapstream-firefly snapstream_firefly
* rc-streamzap streamzap
* rc-su3000 su3000
* rc-tbs-nec tbs_nec
* rc-technisat-ts35 technisat_ts35
* rc-technisat-usb2 technisat_usb2
* rc-terratec-cinergy-c-pci terratec_cinergy_c_pci
* rc-terratec-cinergy-s2-hd terratec_cinergy_s2_hd
* rc-terratec-cinergy-xs terratec_cinergy_xs
* rc-terratec-slim-2 terratec_slim_2
* rc-terratec-slim terratec_slim
* rc-tevii-nec tevii_nec
* rc-tivo tivo
* rc-total-media-in-hand-02 total_media_in_hand_02
* rc-total-media-in-hand total_media_in_hand
* rc-trekstor trekstor
* rc-tt-1500 tt_1500
* rc-twinhan-dtv-cab-ci twinhan_dtv_cab_ci
* rc-twinhan1027 twinhan_vp1027_dvbs
* rc-videomate-k100 videomate_k100
* rc-videomate-s350 videomate_s350
* rc-videomate-tv-pvr videomate_tv_pvr
* rc-winfast-usbii-deluxe winfast_usbii_deluxe
* rc-winfast winfast
# * * a800 # found in a800.c
# * * af9005 # found in af9005-remote.c
# * * cinergyt2 # found in cinergyT2-core.c
# * * dvico_mce # found in cxusb.c
# * * dvico_portable # found in cxusb.c
# * * d680_dmb # found in cxusb.c
# * * dibusb # found in dibusb-common.c
# * * digitv # found in digitv.c
# * * megasky # found in m920x.c
# * * tvwalkerir-kbd-i2c rc-hauppauge /lib/udev/rc_keymaps/rc-hauppaugetwin # found in m920x.c
# * * pinnacle310e # found in m920x.c
# * * haupp # found in nova-t-usb2.c
# * * opera1 # found in opera1.c
# * * vp702x # found in vp702x.c
# * * vp7045 # found in vp7045.c
# Hauppauge PVR 350
ir-kbd-i2c rc-hauppauge /lib/udev/rc_keymaps/rc-hauppauge
# imon-pad
imon rc-imon-pad /lib/udev/rc_keymaps/rc-imon-pad
imon rc-imon-mce /lib/udev/rc_keymaps/rc-imon-mce
# TT-1500/1501
* rc-tt-1500 /lib/udev/rc_keymaps/rc-tt-1500
budget_ci rc-tt-1500 /lib/udev/rc_keymaps/rc-tt-1501
# rc-rc6-mce
* rc-rc6-mce /lib/udev/rc_keymaps/rc-rc6-mce
# CIR
ite-cir rc-rc6-mce /lib/udev/rc_keymaps/rc-rc6-mce
nuvoton-cir rc-rc6-mce /lib/udev/rc_keymaps/rc-rc6-mce
# mceusb
mceusb rc-rc6-mce /lib/udev/rc_keymaps/HOPLOrc6
# Skystarhd2
mantis_core * /lib/udev/rc_keymaps/skystarhd2
# Medion X10
ati_remote rc-medion-x10 /lib/udev/rc_keymaps/rc-medion-x10
ati_remote rc-medion-x10-or2x /lib/udev/rc_keymaps/rc-medion-x10-or2x
ati_remote rc-medion-x10-digitainer /lib/udev/rc_keymaps/rc-medion-x10-digitainer

View File

@@ -21,14 +21,6 @@
owner: '{{ vdr.user }}' owner: '{{ vdr.user }}'
group: '{{ vdr.group }}' group: '{{ vdr.group }}'
- name: "expand template for vdr's .Xresources"
template:
src: 'templates/.Xresources.j2'
dest: '{{ vdr.home }}/.Xresources'
mode: 0644
owner: '{{ vdr.user }}'
group: '{{ vdr.group }}'
- name: expand template for openbox autostart - name: expand template for openbox autostart
template: template:
src: 'templates/openbox/autostart.j2' src: 'templates/openbox/autostart.j2'
@@ -87,15 +79,6 @@
src: templates/systemd/user/osd2web.service.j2 src: templates/systemd/user/osd2web.service.j2
dest: '{{ vdr.home }}/.config/systemd/user/osd2web.service' dest: '{{ vdr.home }}/.config/systemd/user/osd2web.service'
- name: create irexec configuration for the session
block:
- template:
src: templates/systemd/user/irexec.service.j2
dest: '{{ vdr.home }}/.config/systemd/user/irexec.service'
- template:
src: templates/.lircrc.j2
dest: '{{ vdr.home }}/.lircrc'
- name: link /usr/bin/start-desktop to /var/lib/vdr/plugins/desktop/starter - name: link /usr/bin/start-desktop to /var/lib/vdr/plugins/desktop/starter
file: file:
src: /usr/bin/start-desktop src: /usr/bin/start-desktop

View File

@@ -28,40 +28,7 @@
name: x@vt7.service name: x@vt7.service
state: stopped state: stopped
- name: Workaround for wrong connector names on first run - name: "wait a little bit before starting x-verbose@vt7.service (needed?)"
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
tags: first_run
- 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: "wait a little bit, so udev has some time to reapply rules (needed?)"
wait_for: wait_for:
timeout: 3 timeout: 3

View File

@@ -1,8 +1,5 @@
--- ---
# file: roles/yavdr-xorg/tasks/main.yml # file: roles/yavdr-xorg/tasks/main.yml
- import_tasks: setup-xorg.yml - import_tasks: setup-xorg.yml tags=install,update
tags: [install,update] - import_tasks: detect-xorg.yml tags=xorg:detect,install
- import_tasks: detect-xorg.yml - import_tasks: desktop-session.yml tags=install,update
tags: [xorg.detect,install]
- import_tasks: desktop-session.yml
tags: [install,update]

View File

@@ -8,7 +8,6 @@
- "/etc/systemd/system/x@.service.d/" - "/etc/systemd/system/x@.service.d/"
- "/etc/systemd/system/vdr.service.d/" - "/etc/systemd/system/vdr.service.d/"
- "/etc/systemd/system/user@{{ vdr.uid }}.service.d/" - "/etc/systemd/system/user@{{ vdr.uid }}.service.d/"
- "/etc/X11/xorg.conf.d/"
- name: systemd-drop-in | add dependency to X-server for vdr.service - name: systemd-drop-in | add dependency to X-server for vdr.service
template: template:
@@ -25,11 +24,6 @@
src: templates/systemd/vdr-environ.j2 src: templates/systemd/vdr-environ.j2
dest: /etc/systemd/system/vdr.service.d/load-environ.conf dest: /etc/systemd/system/vdr.service.d/load-environ.conf
- name: systemd-drop-in | start vdr.service after network-online.target
template:
src: templates/systemd/network-online.j2
dest: /etc/systemd/system/vdr.service.d/network-online.conf
- name: systemd-drop-in | user@{{ vdr.uid }}.service depends on x@vt7.service - name: systemd-drop-in | user@{{ vdr.uid }}.service depends on x@vt7.service
template: template:
src: templates/user@666.service.d/x-dependency.conf.j2 src: templates/user@666.service.d/x-dependency.conf.j2
@@ -67,26 +61,8 @@
- read-edid - read-edid
- tmux - tmux
- vdr-plugin-desktop - vdr-plugin-desktop
- vdr-plugin-osd2web
- feh
#- yavdr-xorg #- yavdr-xorg
- name: download yavdr logo
block:
- file:
dest: '/usr/share/yavdr/images'
state: directory
- get_url:
url: 'https://github.com/yavdr/yavdr-base/raw/master/images/yavdr_logo.png'
dest: '/usr/share/yavdr/images/yavdr_logo.png'
- name: command | write keyboard configuration to /etc/X11/xorg.conf.d/00-keyboard.conf
command: write-x11-keyboard-config
creates: /etc/X11/xorg.conf.d/00-keyboard.conf
# NOTE: write-x11-keyboard-config is in the xlogin package
# Ubuntu's systemd is patched, so it does not create the file automatically
- name: apt | install desktop programs - name: apt | install desktop programs
apt: apt:
name: '{{ item }}' name: '{{ item }}'

View File

@@ -1,16 +0,0 @@
xterm*background: Black
xterm*foreground: grey
XTerm*locale: true
XTerm*metaSendsEscape: true
XTerm*eightBitInput: false
XTerm*backarrowKey: false
XTerm*ttyModes: erase ^?
Xterm*saveLines: 4096
XTerm.vt100.metaSendsEscape: true
XTerm.vt100.geometry: 80x32
XTerm.vt100.renderFont: true
xterm*faceName: xft:DejaVu Sans Mono
xterm*faceSize: 14
xterm*renderFont: true
XTerm.vt100.faceName: xft:DejaVu Sans Mono:size=12:antialias=false
XTerm.vt100.font: 7x13

View File

@@ -1,5 +0,0 @@
begin
prog = irexec
button = KEY_HOME
config = frontend-dbus-send switchbetween kodi vdr
end

View File

@@ -1,3 +1,3 @@
#!/bin/bash #!/bin/bash
{{ ansible_managed_file | comment }} # {{ ansible_managed_file }}
exec openbox-session exec openbox-session

View File

@@ -3,13 +3,11 @@
env | grep "DISPLAY\|DBUS_SESSION_BUS_ADDRESS\|XDG_RUNTIME_DIR" > ~/.session-env env | grep "DISPLAY\|DBUS_SESSION_BUS_ADDRESS\|XDG_RUNTIME_DIR" > ~/.session-env
systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS systemctl --user import-environment DISPLAY XAUTHORITY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
feh --bg-center "/usr/share/yavdr/images/yavdr_logo.png"
enabled_services=( enabled_services=(
"tmux.service" "detect-second-display.service" "tmux.service" "detect-second-display.service"
"openbox-second.service" "osd2web.service" "openbox-second.service" "osd2web.service"
"yavdr-frontend.service" "pulseaudio.socket" "yavdr-frontend.service" "pulseaudio.socket"
"pulseaudio.service" "wm-exit.service" "irexec.service") "pulseaudio.service" "wm-exit.service")
disabled_services=() disabled_services=()
# enable configured services for the user session # enable configured services for the user session

View File

@@ -54,7 +54,7 @@
S: shade (roll up/down) S: shade (roll up/down)
D: omnipresent (on all desktops). D: omnipresent (on all desktops).
--> -->
<keepBorder>no</keepBorder> <keepBorder>yes</keepBorder>
<animateIconify>yes</animateIconify> <animateIconify>yes</animateIconify>
<font place="ActiveWindow"> <font place="ActiveWindow">
<name>sans</name> <name>sans</name>
@@ -321,6 +321,22 @@
<direction>down</direction> <direction>down</direction>
</action> </action>
</keybind> </keybind>
<!-- Keybindings for running applications -->
<keybind key="W-e">
<action name="Execute">
<startupnotify>
<enabled>true</enabled>
<name>Konqueror</name>
</startupnotify>
<command>kfmclient openProfile filemanagement</command>
</action>
</keybind>
<!-- Launch scrot when Print is pressed -->
<keybind key="Print">
<action name="Execute">
<command>scrot</command>
</action>
</keybind>
</keyboard> </keyboard>
<mouse> <mouse>
<dragThreshold>1</dragThreshold> <dragThreshold>1</dragThreshold>
@@ -780,27 +796,21 @@
<applications> <applications>
<application title="softhddevice"> <application title="softhddevice">
<decor>no</decor> <decor>no</decor>
<maximized>yes</maximized> <maximized>true</maximized>
<!--<skip_pager>yes</skip_pager>-->
<skip_taskbar>no</skip_taskbar>
</application>
<application class="VDR">
<decor>no</decor>
<maximized>yes</maximized>
<!--<skip_pager>yes</skip_pager>--> <!--<skip_pager>yes</skip_pager>-->
<skip_taskbar>no</skip_taskbar> <skip_taskbar>no</skip_taskbar>
</application> </application>
<application title="browser"> <application title="browser">
<decor>no</decor> <decor>no</decor>
<maximized>yes</maximized> <maximized>true</maximized>
<!--<skip_pager>yes</skip_pager>--> <!--<skip_pager>yes</skip_pager>-->
<skip_taskbar>no</skip_taskbar> <skip_taskbar>yes</skip_taskbar>
</application> </application>
<application title="osd2Web"> <application title="osd2Web">
<decor>no</decor> <decor>no</decor>
<maximized>yes</maximized> <maximized>true</maximized>
<!--<skip_pager>yes</skip_pager>--> <!--<skip_pager>yes</skip_pager>-->
<skip_taskbar>no</skip_taskbar> <skip_taskbar>yes</skip_taskbar>
</application> </application>
</applications> </applications>
</openbox_config> </openbox_config>

View File

@@ -1,2 +0,0 @@
[Unit]
After=network-online.target

View File

@@ -1,9 +0,0 @@
[Unit]
Description=LIRC command handler
[Service]
Type=simple
ExecStart=/usr/bin/irexec %h/.lircrc
[Install]
WantedBy=yavdr-desktop.target

View File

@@ -9,7 +9,6 @@ ConditionFileNotEmpty=%h/.second_display
PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
EnvironmentFile=%h/.second_display EnvironmentFile=%h/.second_display
ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml ExecStart=/usr/bin/openbox --config-file %h/.config/openbox/rc.xml
ExecStartPost=/bin/bash %h/.fehbg
[Install] [Install]
WantedBy=yavdr-desktop.target WantedBy=yavdr-desktop.target

View File

@@ -7,7 +7,7 @@ ConditionFileNotEmpty=%h/.second_display
[Service] [Service]
EnvironmentFile=%h/.second_display EnvironmentFile=%h/.second_display
PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS PassEnvironment=XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
ExecStart=/usr/bin/on_vdr -o -c 'kiosk-browser "http://localhost:4444/skins/horchiTft/index.html?theme=bluecd&onlyView=1"' ExecStart=/usr/bin/on_vdr -o -c 'kiosk-browser "http://localhost:4444/skins/horchiTft/index.html?theme=blue&onlyView=1"'
KillSignal=SIGINT KillSignal=SIGINT
[Install] [Install]

View File

@@ -1,4 +1,5 @@
{{ ansible_managed_file | comment }} # file: roles/yavdr-xorg/templates/vdr-xorg.conf
# {{ ansible_managed_file }}
[Unit] [Unit]
After=x@vt7.service After=x@vt7.service
Wants=x@vt7.service Wants=x@vt7.service

View File

@@ -48,9 +48,7 @@ Section "Screen"
Option "ConnectedMonitor" "{{ xorg.primary.connector }}{% if xorg.secondary is defined %}, {{ xorg.secondary.connector }}{% endif %}" Option "ConnectedMonitor" "{{ xorg.primary.connector }}{% if xorg.secondary is defined %}, {{ xorg.secondary.connector }}{% endif %}"
Option "UseDisplayDevice" "{{ xorg.primary.connector }}" Option "UseDisplayDevice" "{{ xorg.primary.connector }}"
Option "CustomEDID" "{{ xorg.primary.connector }}:/etc/X11/edid.{{ xorg.primary.connector }}.bin" Option "CustomEDID" "{{ xorg.primary.connector }}:/etc/X11/edid.{{ xorg.primary.connector }}.bin"
Option "metamodes" "{{ xorg.primary.connector }}: {{ xorg.primary.mode }} +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}" Option "metamodes" "{{ xorg.primary.connector }}: {{ xorg.primary.mode }} +0+0"
Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on"
Option "SLI" "Off" Option "SLI" "Off"
Option "MultiGPU" "Off" Option "MultiGPU" "Off"
Option "BaseMosaic" "off" Option "BaseMosaic" "off"
@@ -89,9 +87,7 @@ Section "Screen"
Option "ConnectedMonitor" "{{ xorg.secondary.connector }}" Option "ConnectedMonitor" "{{ xorg.secondary.connector }}"
Option "UseDisplayDevice" "{{ xorg.secondary.connector }}" Option "UseDisplayDevice" "{{ xorg.secondary.connector }}"
Option "CustomEDID" "{{ xorg.secondary.connector }}:/etc/X11/edid.{{ xorg.secondary.connector }}.bin" Option "CustomEDID" "{{ xorg.secondary.connector }}:/etc/X11/edid.{{ xorg.secondary.connector }}.bin"
Option "metamodes" "{{ xorg.secondary.connector }}: {{ xorg.secondary.mode }} +0+0 {ForceCompositionPipeline=On, ForceFullCompositionPipeline=On}" Option "metamodes" "{{ xorg.secondary.connector }}: {{ xorg.secondary.mode }} +0+0"
Option "AllowIndirectGLXProtocol" "off"
Option "TripleBuffer" "on"
Option "SLI" "Off" Option "SLI" "Off"
Option "MultiGPU" "Off" Option "MultiGPU" "Off"
Option "BaseMosaic" "off" Option "BaseMosaic" "off"

View File

@@ -10,7 +10,7 @@
- collect-facts # query system facts - collect-facts # query system facts
- vdr - vdr
- yavdr-network - yavdr-network
- samba-server - samba-install
- samba-config - samba-config
- nfs-server - nfs-server
- grub-config - grub-config

View File

@@ -27,13 +27,14 @@
- autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found - autoinstall-hauppauge-pvr # install vdr-plugin-pvrinput if a matching card is found
- autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
- autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected - autoinstall-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected
- autoinstall-atric-usb # preconfigure lircd for Atric IR-WakeupUSB receiver
- autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards - autoinstall-dvbsky-firmware # download an install required firmware files for dvbsky cards
- kodi - kodi
- dvd # set up packages and a udev rule to allow kodi and other players - dvd # set up packages and a udev rule to allow kodi and other players
# to play and eject optical media # to play and eject optical media
- wakeup # set up wakeup methods for rtc etc. - wakeup # set up wakeup methods for rtc etc.
- grub-config # configure grub - grub-config # configure grub
tags:
- always
handlers: handlers:
- import_tasks: handlers/main.yml - import_tasks: handlers/main.yml