This commit is contained in:
Alexander Grothe 2017-07-28 16:10:48 +02:00
commit c61c037914
16 changed files with 34 additions and 2 deletions

View File

@ -1,4 +1,5 @@
# -*- mode: org; -*- # -*- mode: org; -*-
* Settings for Export
# Local Variables: # Local Variables:
# org-src-preserve-indentation: t # org-src-preserve-indentation: t
# End: # End:
@ -3201,7 +3202,7 @@ Description=Start kodi in user session
Type=simple 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 ExecStart=/usr/bin/kodi -l /run/lirc/lircd
ExecStop=/bin/bash -c "/usr/bin/kodi-send --action=QUIT; while /usr/bin/pgrep kodi; do sleep 1; done; sleep 1" 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

View File

@ -3,6 +3,7 @@
# 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 ***" ansible_managed_file: "*** YAVDR: ANSIBLE MANAGED FILE ***"
branch: unstable branch: unstable
ppa_owner: 'ppa:yavdr' ppa_owner: 'ppa:yavdr'
# a list of all package repositories to be added to the installation # a list of all package repositories to be added to the installation
@ -12,6 +13,7 @@ repositories:
- '{{ 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
@ -31,6 +33,7 @@ vdr_plugins:
- vdr-plugin-markad - vdr-plugin-markad
- vdr-plugin-restfulapi - vdr-plugin-restfulapi
- vdr-plugin-softhddevice-vpp - vdr-plugin-softhddevice-vpp
# dictionary of directories for (shared) files. Automatically exported via NFS and Samba if those roles are enabled # dictionary of directories for (shared) files. Automatically exported via NFS and Samba if those roles are enabled
media_dirs: media_dirs:
audio: /srv/audio audio: /srv/audio
@ -39,11 +42,14 @@ media_dirs:
files: /srv/files files: /srv/files
backups: /srv/backups backups: /srv/backups
recordings: '{{ vdr.recdir }}' recordings: '{{ vdr.recdir }}'
nfs: nfs:
insecure: false # set to true for OS X clients or if you plan to use libnfs as unprivileged user (e.g. KODI) insecure: false # set to true for OS X clients or if you plan to use libnfs as unprivileged user (e.g. KODI)
samba: samba:
workgroup: YAVDR workgroup: YAVDR
windows_compatible: '{{ vdr.safe_dirnames }}' # set to true to disable unix extensions, enable follow symlinks and wide links windows_compatible: '{{ vdr.safe_dirnames }}' # set to true to disable unix extensions, enable follow symlinks and wide links
# additional packages you want to install # additional packages you want to install
extra_packages: extra_packages:
- vim - vim
@ -52,6 +58,7 @@ extra_packages:
- w-scan - w-scan
- bpython - bpython
- bpython3 - bpython3
frontend: vdr frontend: vdr
#system: #system:
# shutdown: poweroff # shutdown: poweroff

View File

@ -1,3 +1,4 @@
- name: Restart Samba - name: Restart Samba
systemd: systemd:
name: smbd.service name: smbd.service

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
if (( $EUID != 0 )); then if (( $EUID != 0 )); then
echo "This script must be run using sudo or as root" echo "This script must be run using sudo or as root"
exit exit

View File

@ -1,4 +1,5 @@
#!/usr/bin/env/python #!/usr/bin/env/python
# This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules. # This Module collects the vendor- and device ids for USB- and PCI(e)-devices and currently loaded kernel modules.
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
DOCUMENTATION = ''' DOCUMENTATION = '''
--- ---
module: hardware_facts module: hardware_facts

View File

@ -1,4 +1,5 @@
#!/usr/bin/env python2 #!/usr/bin/env python2
from __future__ import print_function from __future__ import print_function
import ast import ast
import binascii import binascii

View File

@ -5,7 +5,7 @@ Description=Start kodi in user session
Type=simple 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 ExecStart=/usr/bin/kodi -l /run/lirc/lircd
ExecStop=/bin/bash -c "/usr/bin/kodi-send --action=QUIT; while /usr/bin/pgrep kodi; do sleep 1; done; sleep 1" 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

View File

@ -77,6 +77,7 @@
follow symlinks= yes follow symlinks= yes
wide links= yes wide links= yes
{% endif %} {% endif %}
{% for name, path in media_dirs.iteritems() %} {% for name, path in media_dirs.iteritems() %}
[{{ name }}] [{{ name }}]
path = {{ path }} path = {{ path }}
@ -92,4 +93,5 @@
wide links = yes wide links = yes
{% endfor %} {% endfor %}
include = /etc/samba/smb.conf.custom include = /etc/samba/smb.conf.custom

View File

@ -1,3 +1,4 @@
foo: foo:
- bar - bar
- baz - baz

View File

@ -10,6 +10,7 @@
- vdr - vdr
- vdrctl - vdrctl
- vdr-plugin-dbus2vdr - vdr-plugin-dbus2vdr
- name: add svdrp and svdrp-disc to /etc/services - name: add svdrp and svdrp-disc to /etc/services
lineinfile: lineinfile:
dest: /etc/services dest: /etc/services
@ -18,6 +19,7 @@
with_items: with_items:
- "svdrp 6419/tcp" - "svdrp 6419/tcp"
- "svdrp-disc 6419/udp" - "svdrp-disc 6419/udp"
- name: create vdr recdir - name: create vdr recdir
file: file:
state: directory state: directory
@ -47,6 +49,7 @@
vdr.hide_first_recording_level vdr.hide_first_recording_level
# TODO: set recdir, user etc. in /etc/vdr/conf.d/ # TODO: set recdir, user etc. in /etc/vdr/conf.d/
- name: apt | install additional vdr plugins - name: apt | install additional vdr plugins
apt: apt:
name: '{{ item }}' name: '{{ item }}'
@ -55,6 +58,7 @@
with_items: with_items:
'{{ vdr_plugins | default({}) }}' '{{ vdr_plugins | default({}) }}'
notify: [ 'Restart VDR' ] notify: [ 'Restart VDR' ]
- name: ensure vdr is stopped - name: ensure vdr is stopped
systemd: systemd:
name: vdr.service name: vdr.service

View File

@ -4,10 +4,12 @@
template: template:
src: templates/90-norecommends.j2 src: templates/90-norecommends.j2
dest: /etc/apt/apt.conf.d/90norecommends dest: /etc/apt/apt.conf.d/90norecommends
- name: use bash instead of dash - name: use bash instead of dash
shell: | shell: |
echo "set dash/sh false" | debconf-communicate echo "set dash/sh false" | debconf-communicate
dpkg-reconfigure -f noninteractive dash dpkg-reconfigure -f noninteractive dash
- name: create vdr group - name: create vdr group
group: group:
gid: '{{ vdr.gid }}' gid: '{{ vdr.gid }}'
@ -23,6 +25,7 @@
shell: '/bin/bash' shell: '/bin/bash'
state: present state: present
append: true append: true
- name: disable release-upgrade notifications - name: disable release-upgrade notifications
lineinfile: lineinfile:
dest: /etc/update-manager/release-upgrades dest: /etc/update-manager/release-upgrades
@ -30,6 +33,7 @@
state: present state: present
regexp: '^(Prompt=).*$' regexp: '^(Prompt=).*$'
line: '\1never' line: '\1never'
- name: add yaVDR PPAs - name: add yaVDR PPAs
apt_repository: apt_repository:
repo: '{{ item }}' repo: '{{ item }}'
@ -41,6 +45,7 @@
apt: apt:
upgrade: dist upgrade: dist
update_cache: yes update_cache: yes
- name: apt | install basic packages - name: apt | install basic packages
apt: apt:
name: '{{ item }}' name: '{{ item }}'
@ -63,6 +68,7 @@
- wpasupplicant - wpasupplicant
- usbutils - usbutils
- xfsprogs - xfsprogs
- name: apt | install extra packages - name: apt | install extra packages
apt: apt:
name: '{{ item }}' name: '{{ item }}'
@ -70,6 +76,7 @@
install_recommends: no install_recommends: no
with_items: with_items:
'{{ extra_packages }}' '{{ extra_packages }}'
- name: get information about usb and pci hardware and loaded kernel modules - name: get information about usb and pci hardware and loaded kernel modules
hardware_facts: hardware_facts:
usb: True usb: True
@ -85,6 +92,7 @@
- pci - pci
- gpus - gpus
- modules - modules
- name: create media directories - name: create media directories
file: file:
dest: '{{ item.value }}' dest: '{{ item.value }}'

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
# forward environment variables to an environment file and the systemd user session # forward environment variables to an environment file and the systemd user session
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

View File

@ -1,2 +1,3 @@
[Service] [Service]
EnvironmentFile=-/var/lib/vdr/.session-env EnvironmentFile=-/var/lib/vdr/.session-env

View File

@ -1,3 +1,4 @@
Section "Device" Section "Device"
Identifier "nvidia" Identifier "nvidia"
Driver "nvidia" Driver "nvidia"

View File

@ -1,3 +1,4 @@
{{ ansible_managed_file | comment }} {{ ansible_managed_file | comment }}
Section "ServerLayout" Section "ServerLayout"