Add template for svdrphosts.conf
you can define additional hosts or subnets (default is to allow access from localhost) in svdrphosts.conf by creating a list variable vdr_svdrphosts - e.g. in host_vars/localhost or in group_vars/all: vdr_svdrphosts: - 192.168.0.0/24 also cleanup some of the structure in Manual.org and update Manual.html
This commit is contained in:
@@ -94,6 +94,14 @@
|
||||
mode: 0644
|
||||
force: no
|
||||
when: vdr_channels_conf is not defined and vdr_channels_conf_url is defined
|
||||
|
||||
- name: "vdr configuration | svdrphosts.conf"
|
||||
template:
|
||||
src: templates/svdrphosts.conf.j2
|
||||
dest: '{{ vdr.confdir }}/svdrphosts.conf'
|
||||
owner: '{{ vdr.user }}'
|
||||
group: '{{ vdr.group }}'
|
||||
mode: 0644
|
||||
- name: create directory for vdr.service systemd drop-in files
|
||||
file:
|
||||
dest: '{{ item }}'
|
||||
|
||||
20
roles/vdr/templates/svdrphosts.conf.j2
Normal file
20
roles/vdr/templates/svdrphosts.conf.j2
Normal file
@@ -0,0 +1,20 @@
|
||||
{{ ansible_managed | comment }}
|
||||
#
|
||||
# svdrphosts This file describes a number of host addresses that
|
||||
# are allowed to connect to the SVDRP port of the Video
|
||||
# Disk Recorder (VDR) running on this system.
|
||||
# Syntax:
|
||||
#
|
||||
# IP-Address[/Netmask]
|
||||
#
|
||||
|
||||
127.0.0.1 # always accept localhost
|
||||
#192.168.100.0/24 # any host on the local net
|
||||
#204.152.189.113 # a specific host
|
||||
#0.0.0.0/0 # any host on any net (USE THIS WITH CARE!)
|
||||
|
||||
{% if vdr_svdrphosts is defined %}
|
||||
{% for host_or_subnet in vdr_svdrphosts %}
|
||||
{{ host_or_subnet }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
@@ -1,2 +1,3 @@
|
||||
{{ansible_managed | comment }}
|
||||
[Unit]
|
||||
After=network-online.target
|
||||
|
||||
Reference in New Issue
Block a user