diff --git a/Manual.org b/Manual.org index 1dc2e29..5bd4cc0 100644 --- a/Manual.org +++ b/Manual.org @@ -389,6 +389,17 @@ vdr: safe_dirnames: true # escape characters (useful for windows clients and FAT/NTFS file systems) override_vdr_charset: false +# optional additional hosts and subnets for svdrphosts.conf +# +# vdr_svdrphosts: +# - 192.168.0.0/24 + +# copy channels.conf from a local file +# vdr_channels_conf: /path/to/channels.conf + +# download channels.conf from a given url (supports HTTP(S) and FTP) +# vdr_channels_conf_url: http://example.com/vdr/channels.conf + # add the vdr plugins you want to install vdr_plugins: - vdr-plugin-devstatus @@ -450,6 +461,11 @@ extra_packages: :END: #+BEGIN_SRC yaml :tangle group_vars/all :mkdirp yes frontend: vdr + +# vdr shutdown command - SHUTDOWNCMD variable in /etc/default/vdr +# for standby use "/bin/systemctl suspend" +vdr_shutdown_command: poweroff + #system: # shutdown: poweroff wakeup_method: acpiwakeup @@ -1131,6 +1147,12 @@ The additional plugins to install can be set in the variable ~{{vdr_plugins}}~ i owner: '{{ vdr.user }}' group: '{{ vdr.group }}' mode: 0644 + +- name: "vdr configuration | /etc/default/vdr" + template: + src: templates/default_vdr.j2 + dest: /etc/default/vdr + #+END_SRC **** start vdr after network-online.target @@ -1162,6 +1184,16 @@ The additional plugins to install can be set in the variable ~{{vdr_plugins}}~ i After=network-online.target #+END_SRC +**** /etc/default/vdr +#+BEGIN_SRC jinja2 :tangle roles/vdr/templates/default_vdr.j2 :mkdirp yes +{{ ansible_managed | comment }} +# /etc/default/vdr +# +# See also /usr/share/doc/vdr/README.Debian.gz +# + +SHUTDOWNCMD="{{ vdr_shutdown_command }}" +#+END_SRC **** svdrphosts.conf #+BEGIN_SRC jinja2 :tangle roles/vdr/templates/svdrphosts.conf.j2 :mkdirp yes {{ ansible_managed | comment }} diff --git a/group_vars/all b/group_vars/all index 11645e2..88065f1 100644 --- a/group_vars/all +++ b/group_vars/all @@ -23,6 +23,17 @@ vdr: safe_dirnames: true # escape characters (useful for windows clients and FAT/NTFS file systems) override_vdr_charset: false +# optional additional hosts and subnets for svdrphosts.conf +# +# vdr_svdrphosts: +# - 192.168.0.0/24 + +# copy channels.conf from a local file +# vdr_channels_conf: /path/to/channels.conf + +# download channels.conf from a given url (supports HTTP(S) and FTP) +# vdr_channels_conf_url: http://example.com/vdr/channels.conf + # add the vdr plugins you want to install vdr_plugins: - vdr-plugin-devstatus @@ -54,6 +65,11 @@ extra_packages: - vdr-addon-lifeguard-ng - vdrpbd frontend: vdr + +# vdr shutdown command - SHUTDOWNCMD variable in /etc/default/vdr +# for standby use "/bin/systemctl suspend" +vdr_shutdown_command: poweroff + #system: # shutdown: poweroff wakeup_method: acpiwakeup diff --git a/roles/vdr/tasks/main.yml b/roles/vdr/tasks/main.yml index ec77ff8..5af6d28 100644 --- a/roles/vdr/tasks/main.yml +++ b/roles/vdr/tasks/main.yml @@ -102,6 +102,11 @@ owner: '{{ vdr.user }}' group: '{{ vdr.group }}' mode: 0644 + +- name: "vdr configuration | /etc/default/vdr" + template: + src: templates/default_vdr.j2 + dest: /etc/default/vdr - name: create directory for vdr.service systemd drop-in files file: dest: '{{ item }}' diff --git a/roles/vdr/templates/default_vdr.j2 b/roles/vdr/templates/default_vdr.j2 new file mode 100644 index 0000000..5900a06 --- /dev/null +++ b/roles/vdr/templates/default_vdr.j2 @@ -0,0 +1,7 @@ +{{ ansible_managed | comment }} +# /etc/default/vdr +# +# See also /usr/share/doc/vdr/README.Debian.gz +# + +SHUTDOWNCMD="{{ vdr_shutdown_command }}"