Add task to copy a channels.conf if it doesn't exist yet

to use this task assing a path pointing to the wanted channels.conf to
the vdr_channels_conf variable, e.g. in host_vars/localhost.yml:

vdr_channels_conf: /path/to/own_config/channels.conf
This commit is contained in:
Alexander Grothe
2019-03-18 16:08:37 +01:00
parent d86e5f2159
commit 811686490f
2 changed files with 22 additions and 1 deletions

View File

@@ -74,6 +74,16 @@
group: '{{ vdr.group }}'
mode: 0644
force: no
- name: "vdr configuration | copy channels.conf if it doesn't exist yes"
copy:
src: '{{ vdr_channels_conf }}'
dest: '{{ vdr.confdir }}/channels.conf'
owner: '{{ vdr.user }}'
group: '{{ vdr.group }}'
mode: 0644
force: no
when: vdr_channels_conf is defined
- name: create directory for vdr.service systemd drop-in files
file:
dest: '{{ item }}'