Merge branch 'master' of https://github.com/yavdr/yavdr-ansible
This commit is contained in:
commit
7257d8845a
5316
Manual.html
5316
Manual.html
File diff suppressed because it is too large
Load Diff
18
Manual.org
18
Manual.org
@ -183,6 +183,7 @@ The ~yavdr07.yml~ playbook sets up a fully-featured yaVDR installation:
|
||||
- autoinstall-pvr350 # install vdr-plugin-pgvr350 if a matching card is detected
|
||||
- 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-hardware-irmp # install yavdr-hardware-irmp if a matching usb device is detected
|
||||
- kodi
|
||||
- dvd # set up packages and a udev rule to allow kodi and other players
|
||||
# to play and eject optical media
|
||||
@ -3250,6 +3251,20 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
|
||||
when: '"dvb_ttpci" in modules'
|
||||
notify: [ 'Restart VDR' ]
|
||||
#+END_SRC
|
||||
** autoinstall-hardware-irmp
|
||||
*** tasks
|
||||
#+BEGIN_SRC yaml :tangle roles/autoinstall-hardware-irmp/tasks/main.yml :padline no
|
||||
---
|
||||
# file roles/autoinstall-hardware-irmp/tasks/main.yml
|
||||
|
||||
- name: apt | install yavdr-hardware-irmp if connected
|
||||
apt:
|
||||
name: yavdr-hardware-irmp
|
||||
when: '"1209:4444" in usb'
|
||||
#+END_SRC
|
||||
|
||||
**** TODO add other device ids if necessary
|
||||
|
||||
** kodi
|
||||
*** tasks
|
||||
**** Install KODI
|
||||
@ -4116,6 +4131,9 @@ if __name__ == '__main__':
|
||||
#+END_SRC
|
||||
* Handlers
|
||||
#+BEGIN_SRC yaml :tangle handlers/main.yml :mkdirp yes
|
||||
- name: Reconfigure unattended upgrades with dpkg
|
||||
command: '/usr/sbin/dpkg-reconfigure --frontend noninteractive unattended-upgrades'
|
||||
|
||||
- name: Restart Samba
|
||||
systemd:
|
||||
name: smbd.service
|
||||
|
@ -1,3 +1,6 @@
|
||||
- name: Reconfigure unattended upgrades with dpkg
|
||||
command: '/usr/sbin/dpkg-reconfigure --frontend noninteractive unattended-upgrades'
|
||||
|
||||
- name: Restart Samba
|
||||
systemd:
|
||||
name: smbd.service
|
||||
|
3
roles/autoinstall-hardware-irmp/meta/main.yml
Normal file
3
roles/autoinstall-hardware-irmp/meta/main.yml
Normal file
@ -0,0 +1,3 @@
|
||||
---
|
||||
dependencies:
|
||||
- { role: yavdr-common }
|
@ -1,8 +0,0 @@
|
||||
---
|
||||
# file roles/autoinstall-hardware-irmp/tasks/main.yml
|
||||
|
||||
- name: apt | install yavdr-hardware-irmp if connected
|
||||
apt:
|
||||
name: yavdr-hardware-irmp
|
||||
when: '"1209:4444" in usb'
|
||||
notify: [ 'Restart VDR' ]
|
@ -1,10 +1,10 @@
|
||||
---
|
||||
# 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: 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:
|
||||
@ -12,7 +12,18 @@
|
||||
state: present
|
||||
install_recommends: no
|
||||
with_items:
|
||||
- libdvd-pkg
|
||||
- 'libdvd-pkg'
|
||||
|
||||
- name: configure package libdvd-pkg
|
||||
debconf:
|
||||
name: 'libdvd-pkg'
|
||||
question: '{{ item }}'
|
||||
vtype: boolean
|
||||
value: true
|
||||
with_items:
|
||||
- 'libdvd-pkg/post-invoke_hook-install'
|
||||
- 'libdvd-pkg/build boolean'
|
||||
notify: ['Reconfigure unattended upgrades with dpkg']
|
||||
|
||||
- name: change udev rule to allow KODI to eject optical disks
|
||||
shell: sed 's/--lock-media //' /lib/udev/rules.d/60-cdrom_id.rules > /etc/udev/rules.d/60-cdrom_id.rules
|
||||
|
@ -1,2 +1,2 @@
|
||||
- include: install-kodi.yml tags=install,update,kodi:install
|
||||
- include: configure-kodi.yml tags=install,update,kodi:configure
|
||||
- import_tasks: install-kodi.yml tags=install,update,kodi:install
|
||||
- import_tasks: configure-kodi.yml tags=install,update,kodi:configure
|
||||
|
@ -1,51 +0,0 @@
|
||||
#!/usr/bin/ env python3
|
||||
import subprocess
|
||||
|
||||
|
||||
xrandr_data = subprocess.check_output(['xrandr', '-q'], universal_newlines=True)
|
||||
|
||||
|
||||
def print_modelines(resolutions):
|
||||
if resolutions:
|
||||
for resolution, refreshrates in reversed(sorted(resolutions.items())):
|
||||
for refreshrate in refreshrates:
|
||||
print("{}_{}".format(resolution, refreshrate))
|
||||
|
||||
|
||||
def cleanup_refreshrate(refreshrate):
|
||||
return refreshrate.replace('+', '').replace('*', '')
|
||||
|
||||
resolutions = {}
|
||||
for line in xrandr_data.splitlines():
|
||||
if line.startswith('Screen'):
|
||||
print_modelines(resolutions)
|
||||
new_connection = False
|
||||
screen = line.split(':', maxsplit=1)[0].split()[-1]
|
||||
new_screen = True
|
||||
print('Screen: {}'.format(screen))
|
||||
|
||||
elif new_screen and not new_connection and ' connected ' in line:
|
||||
connection = line.split()[0]
|
||||
new_screen = False
|
||||
new_connection = True
|
||||
print('Connection: {}'.format(connection))
|
||||
resolutions = {}
|
||||
|
||||
elif new_connection and line.startswith(' '):
|
||||
resolution, *refreshrates = line.split()
|
||||
res_x, res_y = resolution.split('x')
|
||||
resolution = (int(res_x), int(res_y))
|
||||
r = []
|
||||
for refreshrate in refreshrates:
|
||||
if '+' in refreshrate:
|
||||
current_mode = (resolution,
|
||||
cleanup_refreshrate(refreshrate))
|
||||
print('Current Mode: {}@{}'.format(*current_mode))
|
||||
if '*' in refreshrate:
|
||||
preferred_mode = (resolution,
|
||||
cleanup_refreshrate(refreshrate))
|
||||
print('Preferred Mode: {}@{}'.format(*preferred_mode))
|
||||
r.append(cleanup_refreshrate(refreshrate))
|
||||
resolutions[resolution] = r
|
||||
|
||||
print_modelines(resolutions)
|
36
yavdr07.yml
36
yavdr07.yml
@ -1,36 +0,0 @@
|
||||
---
|
||||
# file: yavdr07.yml
|
||||
# this playbook sets up a complete yaVDR 0.7 installation
|
||||
|
||||
- name: set up yaVDR
|
||||
hosts: all
|
||||
become: true
|
||||
roles:
|
||||
- yavdr-common # install and configure the basic system
|
||||
- autoinstall-ubuntu-drivers # use ubuntu-drivers to install proprietary dirvers
|
||||
# (e.g. nvidia, virtualbox)
|
||||
# - nvidia-387 # install very recent nvidia-387 from ppa:graphics-drivers/ppa
|
||||
- vdr # install vdr and related packages
|
||||
- yavdr-network # enable network client capabilities
|
||||
- samba-install # install samba server
|
||||
- samba-config # configure samba server
|
||||
- nfs-server # install nfs server
|
||||
- pulseaudio # install pulseaudio
|
||||
- yavdr-xorg # graphical session
|
||||
- yavdr-remote # remote configuration files, services and scripts
|
||||
- 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-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected
|
||||
- autoinstall-pvr350 # install vdr-plugin-pgvr350 if a matching card is detected
|
||||
- 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-hardware-irmp # install yavdr-hardware-irmp if a matching usb device was detected
|
||||
- kodi
|
||||
- dvd # set up packages and a udev rule to allow kodi and other players
|
||||
# to play and eject optical media
|
||||
- grub-config # configure grub
|
||||
tags:
|
||||
- always
|
||||
|
||||
handlers:
|
||||
- import_tasks: handlers/main.yml
|
Loading…
Reference in New Issue
Block a user