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; -*-
* Settings for Export
# Local Variables:
# org-src-preserve-indentation: t
# End:
@ -3201,7 +3202,7 @@ Description=Start kodi in user session
Type=simple
PassEnvironment=DISPLAY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
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"
TimeoutStopSec=10
SuccessExitStatus=0 127

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -5,7 +5,7 @@ Description=Start kodi in user session
Type=simple
PassEnvironment=DISPLAY XDG_RUNTIME_DIR DBUS_SESSION_BUS_ADDRESS
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"
TimeoutStopSec=10
SuccessExitStatus=0 127

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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