- use generic media_dirs including vdr recdir, loop over them to create directories, configure samba, nfs, etc. - add role to install an configure nfs-kernel-server - cleanup roles - add custom fact modules
61 lines
1.3 KiB
YAML
61 lines
1.3 KiB
YAML
---
|
|
# file: roles/vdr/tasks/main.yml
|
|
|
|
- name: apt | install basic vdr packages
|
|
apt:
|
|
name: '{{ item }}'
|
|
state: present
|
|
install_recommends: no
|
|
with_items:
|
|
- vdr
|
|
- vdrctl
|
|
- vdr-plugin-dbus2vdr
|
|
|
|
- name: add svdrp to /etc/services
|
|
lineinfile:
|
|
dest: /etc/services
|
|
state: present
|
|
line: "svdrp 6419/tcp"
|
|
|
|
- name: add svdrp-disc to /etc/services
|
|
lineinfile:
|
|
dest: /etc/services
|
|
state: present
|
|
line: "svdrp-disc 6419/udp"
|
|
|
|
- name: create vdr recdir
|
|
file:
|
|
state: directory
|
|
owner: '{{ vdr.user }}'
|
|
group: '{{ vdr.group }}'
|
|
mode: 0775
|
|
dest: '{{ vdr.recdir }}'
|
|
|
|
- name: set option to use hide-first-recording-level patch
|
|
blockinfile:
|
|
dest: /etc/vdr/conf.d/04-vdr-hide-first-recordinglevel.conf
|
|
create: true
|
|
block: |
|
|
[vdr]
|
|
--hide-first-recording-level
|
|
when:
|
|
vdr.hide_first_recording_level
|
|
|
|
- name: create local dir in recdir
|
|
file:
|
|
state: directory
|
|
owner: '{{ vdr.user }}'
|
|
group: '{{ vdr.group }}'
|
|
mode: '0775'
|
|
dest: '{{ vdr.recdir }}/local'
|
|
when:
|
|
vdr.hide_first_recording_level
|
|
|
|
- name: install additional vdr plugins
|
|
apt:
|
|
name: '{{ item }}'
|
|
state: present
|
|
install_recommends: no
|
|
with_items:
|
|
'{{ vdr_plugins | default({}) }}'
|