Update some descriptions, rearrange order of tasks

This commit is contained in:
Alexander Grothe 2017-07-15 14:28:23 +02:00
parent a27014f076
commit 15dd3f24f8
10 changed files with 160 additions and 141 deletions

View File

@ -7,8 +7,9 @@
#+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/> #+HTML_HEAD: <link rel="stylesheet" type="text/css" href="http://www.pirilampo.org/styles/readtheorg/css/readtheorg.css"/>
#+HTML_HEAD: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script> #+HTML_HEAD: <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
#+HTML_HEAD: <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> #+HTML_HEAD: <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js"></script> #+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.min.js"></script>
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script> #+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>
#+OPTIONS: ^:nil #+OPTIONS: ^:nil
# Local Variables: # Local Variables:
# org-src-preserve-indentation: t # org-src-preserve-indentation: t
@ -16,6 +17,19 @@
#+PROPERTY: header-args :mkdirp yes :padline no #+PROPERTY: header-args :mkdirp yes :padline no
#+TITLE: Ansible Playbooks for yaVDR 0.7 #+TITLE: Ansible Playbooks for yaVDR 0.7
#+Author: Alexander Grothe <seahawk1986@gmx.de> #+Author: Alexander Grothe <seahawk1986@gmx.de>
# #+LATEX_CLASS: article
#+STARTUP: latexpreview
#+LATEX_CLASS_OPTIONS: [ngerman,a4paper,locale=DE,koma,palatino,DIV=15,BCOR=15mm]
#+LATEX_HEADER: \usepackage[margin=3.0cm]{geometry}
#+LATEX_HEADER: \usepackage[ngerman]{babel}
#+LATEX_HEADER: \usepackage{palatino}
#+LATEX_HEADER: \usepackage{inconsolata}
#+LATEX_HEADER: \usepackage{rotating}
#+LATEX_HEADER: \usepackage{paralist}
#+LATEX_HEADER: \usepackage{booktabs}
#+LATEX_HEADER: \usepackage[locale=DE,seperr,repeatunits=true,trapambigerr=false,tophrase={{ bis }}]{siunitx}
#+LaTeX_HEADER: \usemintedstyle{lovelace}
#+LATEX_HEADER_EXTRA:
:END: :END:
* User Stories * User Stories
@ -68,7 +82,8 @@ The lspci(8) utility, in contrast, reports the PCI BusID of a PCI device in the
in printf(3) syntax. The "Bus Location" reported in the /proc/driver/nvidia/gpus/0..N/information files matches the lspci format. in printf(3) syntax. The "Bus Location" reported in the /proc/driver/nvidia/gpus/0..N/information files matches the lspci format.
**** Parsen der /proc/driver/nvidia/gpus/*/information Dateien **** Parsen der /proc/driver/nvidia/gpus/*/information Dateien
#+BEGIN_SRC python #+BEGIN_SRC python
# read the BusID for nvidia cards and the model name from the /proc/driver/nvidia/gpus/*/information file(s) # read the BusID for nvidia cards and the model name
# from the /proc/driver/nvidia/gpus/*/information file(s)
from __future__ import print_function from __future__ import print_function
import glob import glob
import re import re
@ -149,7 +164,8 @@ The ~yavdr07.yml~ playbook sets up a fully-featured yaVDR installation:
become: true become: true
roles: roles:
- yavdr-common # install and configure the basic system - yavdr-common # install and configure the basic system
- autoinstall-ubuntu-drivers # use ubuntu-drivers to install proprietary dirvers (e.g. nvidia, virtualbox) - autoinstall-ubuntu-drivers # use ubuntu-drivers to install proprietary dirvers
# (e.g. nvidia, virtualbox)
- vdr # install vdr and related packages - vdr # install vdr and related packages
- yavdr-network # enable network client capabilities - yavdr-network # enable network client capabilities
- samba-install # install samba server - samba-install # install samba server
@ -161,10 +177,11 @@ The ~yavdr07.yml~ playbook sets up a fully-featured yaVDR installation:
- autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found - autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found
- autoinstall-targavfd # install vdr-plugin-targavfd if display is connected - autoinstall-targavfd # install vdr-plugin-targavfd if display is connected
- autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected - autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected
#- autoinstall-pv350 # install vdr-plugin-pvr350 if a matching card is detected - autoinstall-pvr350 # install vdr-plugin-pvr350 if a matching card is detected
#- autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
- kodi - kodi
- dvd - dvd # set up packages and a udev rule to allow kodi and other players
# to play and eject optical media
- grub-config # configure grub - grub-config # configure grub
handlers: handlers:
@ -273,6 +290,7 @@ extra_packages:
- vim - vim
- tree - tree
- w-scan - w-scan
- bpython
- bpython3 - bpython3
#+END_SRC #+END_SRC
** System pre-configuration ** System pre-configuration
@ -539,17 +557,14 @@ APT::Install-Suggests "0";
#+END_SRC #+END_SRC
**** Add svdrp/svdrp-disc to /etc/services **** Add svdrp/svdrp-disc to /etc/services
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes #+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
- name: add svdrp to /etc/services - name: add svdrp and svdrp-disc to /etc/services
lineinfile: lineinfile:
dest: /etc/services dest: /etc/services
state: present state: present
line: "svdrp 6419/tcp" line: "{{ item }}"
with_items:
- name: add svdrp-disc to /etc/services - "svdrp 6419/tcp"
lineinfile: - "svdrp-disc 6419/udp"
dest: /etc/services
state: present
line: "svdrp-disc 6419/udp"
#+END_SRC #+END_SRC
**** Set up the recording directory for the vdr user **** Set up the recording directory for the vdr user
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes #+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
@ -776,7 +791,6 @@ User0 @osdteletext
#+END_SRC #+END_SRC
** STARTED yavdr-network ** STARTED yavdr-network
*** default variables *** default variables
#+BEGIN_SRC yaml :tangle roles/yavdr-network/main.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/yavdr-network/main.yml :mkdirp yes :padline no
install_avahi: true install_avahi: true
#+END_SRC #+END_SRC
@ -890,19 +904,26 @@ install_avahi: true
--- ---
# 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: install yavdr-remote - name: apt | install yavdr-remote
apt: apt:
name: yavdr-remote name: yavdr-remote
state: present state: present
- name: install lirc - name: apt | install eventlircd
apt:
name: eventlircd
state: present
when:
install_eventlircd is defined and install_eventlircd
- name: apt | install lirc
apt: apt:
name: lircd name: lircd
state: present state: present
when: when:
- install_lircd is defined and install_lircd - install_lircd is defined and install_lircd
- name: disable lircd.socket and lircd.service (conflict with eventlircd with default configuration) - name: stop, mask and disable lircd.socket and lircd.service # (the default lirc configuration conflicts with eventlircd)
systemd: systemd:
name: '{{ item }}' name: '{{ item }}'
enabled: no enabled: no
@ -913,14 +934,6 @@ install_avahi: true
- lircd.socket - lircd.socket
ignore_errors: yes ignore_errors: yes
- name: install eventlircd
apt:
name: eventlircd
state: present
when:
install_eventlircd is defined and install_eventlircd
# TODO: upload lircd2uinput package to PPA # TODO: upload lircd2uinput package to PPA
#- name: install lircd2uinput #- name: install lircd2uinput
# tag: install # tag: install
@ -938,7 +951,7 @@ install_avahi: true
#+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: install pulseaudio - name: apt | install pulseaudio and pavucontrol
apt: apt:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
@ -947,7 +960,7 @@ install_avahi: true
- pulseaudio - pulseaudio
- pavucontrol - pavucontrol
- name: create /etc/asound.conf - name: create /etc/asound.conf with pulseaudio as default device
template: template:
src: templates/alsa/asound.conf.j2 src: templates/alsa/asound.conf.j2
dest: /etc/asound.conf dest: /etc/asound.conf
@ -1380,11 +1393,13 @@ b'\xde\xad\xbe\xef'
name: xlogin@vdr.service name: xlogin@vdr.service
state: stopped state: stopped
enabled: yes enabled: yes
ignore_errors: yes
- name: Stop x - name: Stop x
systemd: systemd:
name: x@vt7.service name: x@vt7.service
state: stopped state: stopped
ignore_errors: yes
- name: install packages for xorg - name: install packages for xorg
apt: apt:
@ -3102,38 +3117,12 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
- '"dvb_ttpci" in modules' - '"dvb_ttpci" in modules'
notify: [ 'Restart VDR' ] notify: [ 'Restart VDR' ]
#+END_SRC #+END_SRC
** dvd
*** tasks
**** install libdvd-pkg
#+BEGIN_SRC yaml :tangle roles/dvd/tasks/main.yml :mkdirp yes :padline no
---
# file: roles/dvd/tasks/main.yml
- name: preconfigure libdvd-pkg
shell: |
echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections
echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections
- name: apt | install libdvd-pkg
apt:
name: '{{ item }}'
state: present
install_recommends: no
with_items:
- libdvd-pkg
#+END_SRC
** kodi ** kodi
*** tasks *** tasks
**** Install KODI **** Install KODI
#+BEGIN_SRC yaml :tangle roles/kodi/tasks/main.yml :mkdirp yes :padline no #+BEGIN_SRC yaml :tangle roles/kodi/tasks/main.yml :mkdirp yes :padline no
--- ---
- 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
args:
creates: /etc/udev/rules.d/60-cdrom_id.rules
- name: apt | install kodi packages - name: apt | install kodi packages
apt: apt:
name: '{{ item }}' name: '{{ item }}'
@ -3789,6 +3778,31 @@ Restart=on-failure
</Favourites> </Favourites>
</keymap> </keymap>
#+END_SRC #+END_SRC
** dvd
*** tasks
**** install libdvd-pkg, allow programs to eject optical media
#+BEGIN_SRC yaml :tangle roles/dvd/tasks/main.yml :mkdirp yes :padline no
---
# file: roles/dvd/tasks/main.yml
- name: preconfigure libdvd-pkg
shell: |
echo 'libdvd-pkg libdvd-pkg/post-invoke_hook-install boolean true' | debconf-set-selections
echo 'libdvd-pkg libdvd-pkg/build boolean true' | debconf-set-selections
- name: apt | install libdvd-pkg
apt:
name: '{{ item }}'
state: present
install_recommends: no
with_items:
- libdvd-pkg
- 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
args:
creates: /etc/udev/rules.d/60-cdrom_id.rules
#+END_SRC
** template-test ** template-test
#+BEGIN_SRC yaml :tangle roles/template-test/tasks/main.yml :padline no #+BEGIN_SRC yaml :tangle roles/template-test/tasks/main.yml :padline no
--- ---
@ -4334,6 +4348,9 @@ EXAMPLES = '''
- debug: - debug:
var: xrandr var: xrandr
- debug:
var: xorg
''' '''
ARG_SPECS = { ARG_SPECS = {

View File

@ -49,6 +49,7 @@ extra_packages:
- vim - vim
- tree - tree
- w-scan - w-scan
- bpython
- bpython3 - bpython3
#system: #system:
# shutdown: poweroff # shutdown: poweroff

View File

@ -51,6 +51,9 @@ EXAMPLES = '''
- debug: - debug:
var: xrandr var: xrandr
- debug:
var: xorg
''' '''
ARG_SPECS = { ARG_SPECS = {

View File

@ -13,3 +13,8 @@
install_recommends: no install_recommends: no
with_items: with_items:
- libdvd-pkg - libdvd-pkg
- 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
args:
creates: /etc/udev/rules.d/60-cdrom_id.rules

View File

@ -1,10 +1,5 @@
--- ---
- 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
args:
creates: /etc/udev/rules.d/60-cdrom_id.rules
- name: apt | install kodi packages - name: apt | install kodi packages
apt: apt:
name: '{{ item }}' name: '{{ item }}'

View File

@ -1,6 +1,6 @@
--- ---
- name: install pulseaudio - name: apt | install pulseaudio and pavucontrol
apt: apt:
name: '{{ item }}' name: '{{ item }}'
state: present state: present
@ -9,7 +9,7 @@
- pulseaudio - pulseaudio
- pavucontrol - pavucontrol
- name: create /etc/asound.conf - name: create /etc/asound.conf with pulseaudio as default device
template: template:
src: templates/alsa/asound.conf.j2 src: templates/alsa/asound.conf.j2
dest: /etc/asound.conf dest: /etc/asound.conf

View File

@ -10,17 +10,14 @@
- vdr - vdr
- vdrctl - vdrctl
- vdr-plugin-dbus2vdr - vdr-plugin-dbus2vdr
- name: add svdrp to /etc/services - name: add svdrp and svdrp-disc to /etc/services
lineinfile: lineinfile:
dest: /etc/services dest: /etc/services
state: present state: present
line: "svdrp 6419/tcp" line: "{{ item }}"
with_items:
- name: add svdrp-disc to /etc/services - "svdrp 6419/tcp"
lineinfile: - "svdrp-disc 6419/udp"
dest: /etc/services
state: present
line: "svdrp-disc 6419/udp"
- name: create vdr recdir - name: create vdr recdir
file: file:
state: directory state: directory

View File

@ -1,19 +1,26 @@
--- ---
# 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: install yavdr-remote - name: apt | install yavdr-remote
apt: apt:
name: yavdr-remote name: yavdr-remote
state: present state: present
- name: install lirc - name: apt | install eventlircd
apt:
name: eventlircd
state: present
when:
install_eventlircd is defined and install_eventlircd
- name: apt | install lirc
apt: apt:
name: lircd name: lircd
state: present state: present
when: when:
- install_lircd is defined and install_lircd - install_lircd is defined and install_lircd
- name: disable lircd.socket and lircd.service (conflict with eventlircd with default configuration) - name: stop, mask and disable lircd.socket and lircd.service # (the default lirc configuration conflicts with eventlircd)
systemd: systemd:
name: '{{ item }}' name: '{{ item }}'
enabled: no enabled: no
@ -24,14 +31,6 @@
- lircd.socket - lircd.socket
ignore_errors: yes ignore_errors: yes
- name: install eventlircd
apt:
name: eventlircd
state: present
when:
install_eventlircd is defined and install_eventlircd
# TODO: upload lircd2uinput package to PPA # TODO: upload lircd2uinput package to PPA
#- name: install lircd2uinput #- name: install lircd2uinput
# tag: install # tag: install

View File

@ -24,11 +24,13 @@
name: xlogin@vdr.service name: xlogin@vdr.service
state: stopped state: stopped
enabled: yes enabled: yes
ignore_errors: yes
- name: Stop x - name: Stop x
systemd: systemd:
name: x@vt7.service name: x@vt7.service
state: stopped state: stopped
ignore_errors: yes
- name: install packages for xorg - name: install packages for xorg
apt: apt:
@ -90,8 +92,11 @@
enabled: false enabled: false
masked: true masked: true
### TODO: Create xorg configuration # TODO: expand template for xorg.conf (or snippets)
- name: create xorg.conf (test) # with respect for the available graphics card driver
# nvidia, noveau, intel, radeon
- name: create xorg.conf (for nvidia driver)
template: template:
src: templates/xorg.conf.j2 src: templates/xorg.conf.j2
dest: /etc/X11/xorg.conf dest: /etc/X11/xorg.conf
@ -186,11 +191,6 @@
src: roles/yavdr-xorg/templates/systemd/user/tmux.service.j2 src: roles/yavdr-xorg/templates/systemd/user/tmux.service.j2
dest: '{{ vdr.home }}/.config/systemd/user/tmux.service' dest: '{{ vdr.home }}/.config/systemd/user/tmux.service'
# TODO: run xorg-debug and parse xrandr output
# TODO: expand template for xorg.conf (or snippets)
# with respect for the available graphics card driver
# nvidia, noveau, intel, radeon
- name: enable and start xlogin for the user vdr - name: enable and start xlogin for the user vdr
systemd: systemd:
daemon_reload: yes daemon_reload: yes

View File

@ -7,7 +7,8 @@
become: true become: true
roles: roles:
- yavdr-common # install and configure the basic system - yavdr-common # install and configure the basic system
- autoinstall-ubuntu-drivers # use ubuntu-drivers to install proprietary dirvers (e.g. nvidia, virtualbox) - autoinstall-ubuntu-drivers # use ubuntu-drivers to install proprietary dirvers
# (e.g. nvidia, virtualbox)
- vdr # install vdr and related packages - vdr # install vdr and related packages
- yavdr-network # enable network client capabilities - yavdr-network # enable network client capabilities
- samba-install # install samba server - samba-install # install samba server
@ -19,10 +20,11 @@
- autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found - autoinstall-satip # install vdr-plugin-satip if a Sat>IP server has been found
- autoinstall-targavfd # install vdr-plugin-targavfd if display is connected - autoinstall-targavfd # install vdr-plugin-targavfd if display is connected
- autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected - autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected
#- autoinstall-pv350 # install vdr-plugin-pvr350 if a matching card is detected - autoinstall-pvr350 # install vdr-plugin-pvr350 if a matching card is detected
#- autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected - autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
- kodi - kodi
- dvd - dvd # set up packages and a udev rule to allow kodi and other players
# to play and eject optical media
- grub-config # configure grub - grub-config # configure grub
handlers: handlers: