Add svdrp service definition, improve template
This commit is contained in:
parent
e358eb65b7
commit
14a9ea894c
139
Manual.org
139
Manual.org
@ -8,6 +8,7 @@
|
|||||||
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js"></script>
|
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/lib/js/jquery.stickytableheaders.js"></script>
|
||||||
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>
|
#+HTML_HEAD: <script type="text/javascript" src="http://www.pirilampo.org/styles/readtheorg/js/readtheorg.js"></script>
|
||||||
#+OPTIONS: ^:nil
|
#+OPTIONS: ^:nil
|
||||||
|
#+PROPERTY: header-args :mkdirp yes
|
||||||
:END:
|
:END:
|
||||||
* Installing and configuring yaVDR with Ansible
|
* Installing and configuring yaVDR with Ansible
|
||||||
This is an experimental feature which allows to set up a yaVDR installation based on a normal Ubuntu Server 16.04.x installation using [[http://ansible.com][Ansible]].
|
This is an experimental feature which allows to set up a yaVDR installation based on a normal Ubuntu Server 16.04.x installation using [[http://ansible.com][Ansible]].
|
||||||
@ -77,12 +78,15 @@ localhost connection=local
|
|||||||
|
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
* Group Variables
|
* Group Variables
|
||||||
|
** default text for templates
|
||||||
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
||||||
# file: group_vars/all
|
# file: group_vars/all
|
||||||
|
|
||||||
# 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 ***"
|
||||||
|
#+END_SRC
|
||||||
|
** PPAs
|
||||||
|
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
||||||
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
|
||||||
@ -92,18 +96,24 @@ 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'
|
||||||
|
#+END_SRC
|
||||||
|
** Drivers
|
||||||
|
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
||||||
drivers:
|
drivers:
|
||||||
sundtek: auto
|
sundtek: auto
|
||||||
ddvb-dkms: auto
|
ddvb-dkms: auto
|
||||||
|
#+END_SRC
|
||||||
|
** Media directories
|
||||||
|
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
||||||
# 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
|
||||||
video: /srv/audio
|
video: /srv/audio
|
||||||
pictures: /srv/audio
|
pictures: /srv/audio
|
||||||
files: /srv/files
|
files: /srv/files
|
||||||
|
#+END_SRC
|
||||||
|
** VDR user, directories, special configuration and plugins
|
||||||
|
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
||||||
# properties of the user vdr and vdr-related options
|
# properties of the user vdr and vdr-related options
|
||||||
vdr:
|
vdr:
|
||||||
user: vdr
|
user: vdr
|
||||||
@ -123,15 +133,22 @@ vdr_plugins:
|
|||||||
- vdr-plugin-restfulapi
|
- vdr-plugin-restfulapi
|
||||||
- vdr-plugin-softhddevice
|
- vdr-plugin-softhddevice
|
||||||
|
|
||||||
|
#+END_SRC
|
||||||
|
** Samba
|
||||||
|
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
||||||
samba:
|
samba:
|
||||||
workgroup: YAVDR
|
workgroup: YAVDR
|
||||||
|
#+END_SRC
|
||||||
|
** Additional packages
|
||||||
|
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
||||||
# additional packages you want to install
|
# additional packages you want to install
|
||||||
extra_packages:
|
extra_packages:
|
||||||
- vim
|
- vim
|
||||||
- tree
|
- tree
|
||||||
- w-scan
|
- w-scan
|
||||||
|
#+END_SRC
|
||||||
|
** System pre-configuration
|
||||||
|
#+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes
|
||||||
system:
|
system:
|
||||||
shutdown: poweroff
|
shutdown: poweroff
|
||||||
grub:
|
grub:
|
||||||
@ -361,62 +378,82 @@ if __name__ == '__main__':
|
|||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** templates
|
*** templates
|
||||||
#+BEGIN_SRC shell :tangle roles/yavdr-common/templates/90-norecommends.j2 :mkdirp yes
|
#+BEGIN_SRC shell :tangle roles/yavdr-common/templates/90-norecommends.j2 :mkdirp yes
|
||||||
// {{ ansible_managed_file }}
|
{{ ansible_managed_file | comment('c') }}
|
||||||
// Recommends are as of now still abused in many packages
|
// Recommends are as of now still abused in many packages
|
||||||
APT::Install-Recommends "0";
|
APT::Install-Recommends "0";
|
||||||
APT::Install-Suggests "0";
|
APT::Install-Suggests "0";
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
** vdr
|
** vdr
|
||||||
*** tasks
|
*** tasks
|
||||||
|
**** install the basic vdr packages
|
||||||
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
|
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
|
||||||
---
|
---
|
||||||
# file: roles/vdr/tasks/main.yml
|
# file: roles/vdr/tasks/main.yml
|
||||||
|
|
||||||
- name: apt | install basic vdr packages
|
- name: apt | install basic vdr packages
|
||||||
apt:
|
apt:
|
||||||
name: '{{ item }}'
|
name: '{{ item }}'
|
||||||
state: present
|
state: present
|
||||||
install_recommends: no
|
install_recommends: no
|
||||||
with_items:
|
with_items:
|
||||||
- vdr
|
- vdr
|
||||||
- vdrctl
|
- vdrctl
|
||||||
- vdr-plugin-dbus2vdr
|
- vdr-plugin-dbus2vdr
|
||||||
|
#+END_SRC
|
||||||
|
**** Add svdrp/svdrp-disc to /etc/services
|
||||||
|
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
|
||||||
|
- name: add svdrp to /etc/services
|
||||||
|
lineinfile:
|
||||||
|
dest: /etc/services
|
||||||
|
state: present
|
||||||
|
line: "svdrp 6419/tcp"
|
||||||
|
|
||||||
- name: create vdr recdir
|
- name: add svdrp-disc to /etc/services
|
||||||
file:
|
lineinfile:
|
||||||
state: directory
|
dest: /etc/services
|
||||||
owner: '{{ vdr.user }}'
|
state: present
|
||||||
group: '{{ vdr.group }}'
|
line: "svdrp-disc 6419/udp"
|
||||||
mode: 0775
|
#+END_SRC
|
||||||
dest: '{{ vdr.recdir }}'
|
**** Set up the recording directory for the vdr user
|
||||||
|
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
|
||||||
|
- 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
|
- name: set option to use hide-first-recording-level patch
|
||||||
blockinfile:
|
blockinfile:
|
||||||
dest: /etc/vdr/conf.d/04-vdr-hide-first-recordinglevel.conf
|
dest: /etc/vdr/conf.d/04-vdr-hide-first-recordinglevel.conf
|
||||||
create: true
|
create: true
|
||||||
block: |
|
block: |
|
||||||
[vdr]
|
[vdr]
|
||||||
--hide-first-recording-level
|
--hide-first-recording-level
|
||||||
when:
|
when:
|
||||||
vdr.hide_first_recording_level
|
vdr.hide_first_recording_level
|
||||||
|
|
||||||
- name: create local dir in recdir
|
- name: create local dir in recdir
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
owner: '{{ vdr.user }}'
|
owner: '{{ vdr.user }}'
|
||||||
group: '{{ vdr.group }}'
|
group: '{{ vdr.group }}'
|
||||||
mode: '0775'
|
mode: '0775'
|
||||||
dest: '{{ vdr.recdir }}/local'
|
dest: '{{ vdr.recdir }}/local'
|
||||||
when:
|
when:
|
||||||
vdr.hide_first_recording_level
|
vdr.hide_first_recording_level
|
||||||
|
#+END_SRC
|
||||||
- name: install additional vdr plugins
|
**** Install additional vdr plugins
|
||||||
apt:
|
The additional plugins to install can be set in the variable ~{{vdr_plugins}}~ in the group variables
|
||||||
name: '{{ item }}'
|
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
|
||||||
state: present
|
- name: install additional vdr plugins
|
||||||
install_recommends: no
|
apt:
|
||||||
with_items:
|
name: '{{ item }}'
|
||||||
'{{ vdr_plugins }}'
|
state: present
|
||||||
|
install_recommends: no
|
||||||
|
with_items:
|
||||||
|
'{{ vdr_plugins | default({}) }}'
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
*** Set up the directories for files in /srv
|
*** Set up the directories for files in /srv
|
||||||
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
|
#+BEGIN_SRC yaml :tangle roles/vdr/tasks/main.yml :mkdirp yes
|
||||||
|
@ -11,6 +11,18 @@
|
|||||||
- vdrctl
|
- vdrctl
|
||||||
- vdr-plugin-dbus2vdr
|
- 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
|
- name: create vdr recdir
|
||||||
file:
|
file:
|
||||||
state: directory
|
state: directory
|
||||||
@ -45,7 +57,7 @@
|
|||||||
state: present
|
state: present
|
||||||
install_recommends: no
|
install_recommends: no
|
||||||
with_items:
|
with_items:
|
||||||
'{{ vdr_plugins }}'
|
'{{ vdr_plugins | default({}) }}'
|
||||||
|
|
||||||
- name: create directories for media files
|
- name: create directories for media files
|
||||||
file:
|
file:
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// {{ ansible_managed_file }}
|
{{ ansible_managed_file | comment('c') }}
|
||||||
// Recommends are as of now still abused in many packages
|
// Recommends are as of now still abused in many packages
|
||||||
APT::Install-Recommends "0";
|
APT::Install-Recommends "0";
|
||||||
APT::Install-Suggests "0";
|
APT::Install-Suggests "0";
|
||||||
|
Loading…
Reference in New Issue
Block a user