fix some roles, change order of role execution in playbook
This commit is contained in:
parent
dc757482a3
commit
190b94aaa3
157
Manual.org
157
Manual.org
@ -53,19 +53,20 @@ The ~yavdr07.yml~ playbook sets up a fully-featured yaVDR installation:
|
|||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
roles:
|
roles:
|
||||||
- yavdr-common # install and configure the basic system
|
- yavdr-common # install and configure the basic system
|
||||||
- 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
|
||||||
- samba-config # configure samba server
|
- samba-config # configure samba server
|
||||||
- nfs-server # install nfs server
|
- nfs-server # install nfs server
|
||||||
- yavdr-xorg # graphical session
|
- yavdr-xorg # graphical session
|
||||||
- yavdr-remote # remote configuration files, services and scripts
|
- yavdr-remote # remote configuration files, services and scripts
|
||||||
- grub-config # configure grub
|
- 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
|
- autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected
|
||||||
- autoinstall-imonlcd
|
#- autoinstall-pv350 # install vdr-plugin-pvr350 if a matching card is detected
|
||||||
#- template-test
|
#- autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
|
||||||
|
- grub-config # configure grub
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- include: handlers/main.yml
|
- include: handlers/main.yml
|
||||||
@ -784,69 +785,16 @@ systemctl --user import-environment
|
|||||||
#+BEGIN_SRC yaml :tangle roles/samba-config/templates/smb.conf.j2 :mkdirp yes
|
#+BEGIN_SRC yaml :tangle roles/samba-config/templates/smb.conf.j2 :mkdirp yes
|
||||||
include = /etc/samba/smb.conf.custom
|
include = /etc/samba/smb.conf.custom
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** grub-config
|
|
||||||
*** default variables
|
|
||||||
#+BEGIN_SRC yaml :tangle roles/grub-config/defaults/main.yml :mkdirp yes
|
|
||||||
system:
|
|
||||||
shutdown: poweroff
|
|
||||||
grub:
|
|
||||||
timeout: 0
|
|
||||||
boot_options: quiet nosplash
|
|
||||||
#+END_SRC
|
|
||||||
*** tasks
|
|
||||||
#+BEGIN_SRC yaml :tangle roles/grub-config/tasks/main.yml :mkdirp yes
|
|
||||||
- name: custom grub configuration for timeout and reboot halt
|
|
||||||
template:
|
|
||||||
src: templates/50_custom.j2
|
|
||||||
dest: /etc/grub.d/50_custom
|
|
||||||
mode: '0775'
|
|
||||||
notify: [ 'Update GRUB' ]
|
|
||||||
|
|
||||||
# TODO: add special case if plymouth is used
|
|
||||||
- name: let the system boot quietly
|
|
||||||
lineinfile:
|
|
||||||
dest: /etc/default/grub
|
|
||||||
state: present
|
|
||||||
regexp: '^(GRUB_CMDLINE_LINUX_DEFAULT=")'
|
|
||||||
line: '\1{{ grub.boot_options}}"'
|
|
||||||
backrefs: yes
|
|
||||||
notify: [ 'Update GRUB' ]
|
|
||||||
#+END_SRC
|
|
||||||
*** templates
|
|
||||||
#+BEGIN_SRC shell :tangle roles/grub-config/templates/50_custom.j2 :mkdirp yes
|
|
||||||
#!/bin/sh
|
|
||||||
exec tail -n +3 $0
|
|
||||||
|
|
||||||
# This file is configured by the ansible configuration for yaVDR
|
|
||||||
|
|
||||||
{% if system.shutdown is defined and system.shutdown == 'reboot' %}
|
|
||||||
menuentry "PowerOff" {
|
|
||||||
halt
|
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
if [ "${recordfail}" = 1 ]; then
|
|
||||||
set timeout={{ 3 if grub.timeout < 3 else grub.timeout }}
|
|
||||||
else
|
|
||||||
set timeout={{ grub.timeout if grub.timeout is defined else 0 }}
|
|
||||||
fi
|
|
||||||
#+END_SRC
|
|
||||||
*** handlers
|
|
||||||
#+BEGIN_SRC yaml :tangle roles/grub-config/handlers/main.yml :mkdirp yes
|
|
||||||
- name: Update GRUB
|
|
||||||
command: update-grub
|
|
||||||
failed_when: ('error' in grub_register_update.stderr)
|
|
||||||
register: grub_register_update
|
|
||||||
|
|
||||||
# TODO: Do we need to use grub-set-default?
|
|
||||||
# https://github.com/yavdr/yavdr-utils/blob/master/events/actions/update-grub
|
|
||||||
#+END_SRC
|
|
||||||
** TODO autoinstall-drivers
|
** TODO autoinstall-drivers
|
||||||
It would be nice to be able to detect if it is suitable to install those drivers:
|
It would be nice to be able to detect if it is suitable to install those drivers:
|
||||||
- [ ] sundtek for Sundtek devices (local or network connection)
|
*** sundtek for Sundtek devices (local or network connection)
|
||||||
- [ ] dddvb-dkms if only newer DD cards are detected
|
Vendor-IDs:
|
||||||
- [ ] media-build-experimental (up to kernel 4.8) for "old" cards like TT S2-6400 FF
|
- eb1a:5[1b2] (alte Generation)
|
||||||
- [ ] newly merged DD drivers from http://www.vdr-portal.de/board18-vdr-hardware/board102-dvb-karten/120817-treiber-der-cine-ctv6-ddbridge-ci-in-den-kernel-integrieren/
|
- 2659:* (neuere Sticks)
|
||||||
|
*** dddvb-dkms if only newer DD cards are detected
|
||||||
|
*** media-build-experimental (up to kernel 4.8) for "old" cards like TT S2-6400 FF
|
||||||
|
*** newly merged DD drivers
|
||||||
|
from http://www.vdr-portal.de/board18-vdr-hardware/board102-dvb-karten/120817-treiber-der-cine-ctv6-ddbridge-ci-in-den-kernel-integrieren/
|
||||||
|
|
||||||
** autoinstall-satip
|
** autoinstall-satip
|
||||||
*** tasks
|
*** tasks
|
||||||
@ -917,7 +865,7 @@ It would be nice to be able to detect if it is suitable to install those drivers
|
|||||||
apt:
|
apt:
|
||||||
name: vdr-plugin-pvr350
|
name: vdr-plugin-pvr350
|
||||||
when:
|
when:
|
||||||
- '"19c2:6a11" in pci'
|
- '"0070:4000" in pci'
|
||||||
notify: [ 'Restart VDR' ]
|
notify: [ 'Restart VDR' ]
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
@ -947,7 +895,7 @@ Problem: woher kommt der Treiber (AFAIK noch nicht im Kernel)? Die Firmware soll
|
|||||||
apt:
|
apt:
|
||||||
name: vdr-plugin-dvbsddevice
|
name: vdr-plugin-dvbsddevice
|
||||||
when:
|
when:
|
||||||
- '19c2:6a11" in modules'
|
- '"dvb_ttpci" in modules'
|
||||||
notify: [ 'Restart VDR' ]
|
notify: [ 'Restart VDR' ]
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** template-test
|
** template-test
|
||||||
@ -1173,6 +1121,63 @@ system:
|
|||||||
mode:
|
mode:
|
||||||
- "1280x720_60"
|
- "1280x720_60"
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
** grub-config
|
||||||
|
*** default variables
|
||||||
|
#+BEGIN_SRC yaml :tangle roles/grub-config/defaults/main.yml :mkdirp yes
|
||||||
|
system:
|
||||||
|
shutdown: poweroff
|
||||||
|
grub:
|
||||||
|
timeout: 0
|
||||||
|
boot_options: quiet nosplash
|
||||||
|
#+END_SRC
|
||||||
|
*** tasks
|
||||||
|
#+BEGIN_SRC yaml :tangle roles/grub-config/tasks/main.yml :mkdirp yes
|
||||||
|
- name: custom grub configuration for timeout and reboot halt
|
||||||
|
template:
|
||||||
|
src: templates/50_custom.j2
|
||||||
|
dest: /etc/grub.d/50_custom
|
||||||
|
mode: '0775'
|
||||||
|
notify: [ 'Update GRUB' ]
|
||||||
|
|
||||||
|
# TODO: add special case if plymouth is used
|
||||||
|
- name: let the system boot quietly
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/default/grub
|
||||||
|
state: present
|
||||||
|
regexp: '^(GRUB_CMDLINE_LINUX_DEFAULT=")'
|
||||||
|
line: '\1{{ grub.boot_options}}"'
|
||||||
|
backrefs: yes
|
||||||
|
notify: [ 'Update GRUB' ]
|
||||||
|
#+END_SRC
|
||||||
|
*** templates
|
||||||
|
#+BEGIN_SRC shell :tangle roles/grub-config/templates/50_custom.j2 :mkdirp yes
|
||||||
|
#!/bin/sh
|
||||||
|
exec tail -n +3 $0
|
||||||
|
|
||||||
|
# This file is configured by the ansible configuration for yaVDR
|
||||||
|
|
||||||
|
{% if system.shutdown is defined and system.shutdown == 'reboot' %}
|
||||||
|
menuentry "PowerOff" {
|
||||||
|
halt
|
||||||
|
}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
if [ "${recordfail}" = 1 ]; then
|
||||||
|
set timeout={{ 3 if grub.timeout < 3 else grub.timeout }}
|
||||||
|
else
|
||||||
|
set timeout={{ grub.timeout if grub.timeout is defined else 0 }}
|
||||||
|
fi
|
||||||
|
#+END_SRC
|
||||||
|
*** handlers
|
||||||
|
#+BEGIN_SRC yaml :tangle roles/grub-config/handlers/main.yml :mkdirp yes
|
||||||
|
- name: Update GRUB
|
||||||
|
command: update-grub
|
||||||
|
failed_when: ('error' in grub_register_update.stderr)
|
||||||
|
register: grub_register_update
|
||||||
|
|
||||||
|
# TODO: Do we need to use grub-set-default?
|
||||||
|
# https://github.com/yavdr/yavdr-utils/blob/master/events/actions/update-grub
|
||||||
|
#+END_SRC
|
||||||
* Modules
|
* Modules
|
||||||
This section contains custom modules for the yaVDR Playbooks. They are used to collect facts about the system and configure applications and daemons.
|
This section contains custom modules for the yaVDR Playbooks. They are used to collect facts about the system and configure applications and daemons.
|
||||||
** hardware_facts.py
|
** hardware_facts.py
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
apt:
|
apt:
|
||||||
name: vdr-plugin-dvbsddevice
|
name: vdr-plugin-dvbsddevice
|
||||||
when:
|
when:
|
||||||
- '19c2:6a11" in modules'
|
- '"dvb_ttpci" in modules'
|
||||||
notify: [ 'Restart VDR' ]
|
notify: [ 'Restart VDR' ]
|
||||||
|
@ -5,5 +5,5 @@
|
|||||||
apt:
|
apt:
|
||||||
name: vdr-plugin-pvr350
|
name: vdr-plugin-pvr350
|
||||||
when:
|
when:
|
||||||
- '"19c2:6a11" in pci'
|
- '"0070:4000" in pci'
|
||||||
notify: [ 'Restart VDR' ]
|
notify: [ 'Restart VDR' ]
|
||||||
|
27
yavdr07.yml
27
yavdr07.yml
@ -6,19 +6,20 @@
|
|||||||
hosts: all
|
hosts: all
|
||||||
become: true
|
become: true
|
||||||
roles:
|
roles:
|
||||||
- yavdr-common # install and configure the basic system
|
- yavdr-common # install and configure the basic system
|
||||||
- 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
|
||||||
- samba-config # configure samba server
|
- samba-config # configure samba server
|
||||||
- nfs-server # install nfs server
|
- nfs-server # install nfs server
|
||||||
- yavdr-xorg # graphical session
|
- yavdr-xorg # graphical session
|
||||||
- yavdr-remote # remote configuration files, services and scripts
|
- yavdr-remote # remote configuration files, services and scripts
|
||||||
- grub-config # configure grub
|
- 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
|
- autoinstall-imonlcd # install vdr-plugin-imonlcd if a matchind display is connected
|
||||||
- autoinstall-imonlcd
|
#- autoinstall-pv350 # install vdr-plugin-pvr350 if a matching card is detected
|
||||||
#- template-test
|
#- autoinstall-dvbsddevice # install vdr-plugin-dvbsddevice if a matching card is detected
|
||||||
|
- grub-config # configure grub
|
||||||
|
|
||||||
handlers:
|
handlers:
|
||||||
- include: handlers/main.yml
|
- include: handlers/main.yml
|
||||||
|
Loading…
Reference in New Issue
Block a user