From 8dbbfcc0c7193740f7d71770d314f14b7f312593 Mon Sep 17 00:00:00 2001 From: Alexander Grothe Date: Mon, 18 Mar 2019 17:09:28 +0100 Subject: [PATCH] Add task to download channels.conf for vdr' You can set vdr_channels_conf_url to a http(s) or ftp URL - this file will be copied to /var/lib/vdr/channels.conf if vdr_channels_conf is not defined and the channels.conf does not exist yet. Also fixes a typo in task names --- Manual.org | 12 +++++++++++- roles/vdr/tasks/main.yml | 12 +++++++++++- 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/Manual.org b/Manual.org index 026fed3..e43698f 100644 --- a/Manual.org +++ b/Manual.org @@ -1101,7 +1101,7 @@ The additional plugins to install can be set in the variable ~{{vdr_plugins}}~ i mode: 0644 force: no -- name: "vdr configuration | copy channels.conf if it doesn't exist yes" +- name: "vdr configuration | copy channels.conf if it doesn't exist yet" copy: src: '{{ vdr_channels_conf }}' dest: '{{ vdr.confdir }}/channels.conf' @@ -1110,6 +1110,16 @@ The additional plugins to install can be set in the variable ~{{vdr_plugins}}~ i mode: 0644 force: no when: vdr_channels_conf is defined + +- name: "vdr configuration | download channels.conf if it doesn't exist yet" + get_url: + url: '{{ vdr_channels_conf_url }}' + dest: '{{ vdr.confdir }}/channels.conf' + owner: '{{ vdr.user }}' + group: '{{ vdr.group }}' + mode: 0644 + force: no + when: vdr_channels_conf is not defined and vdr_channels_conf_url is defined #+END_SRC **** start vdr after network-online.target diff --git a/roles/vdr/tasks/main.yml b/roles/vdr/tasks/main.yml index f62b8dc..65c4808 100644 --- a/roles/vdr/tasks/main.yml +++ b/roles/vdr/tasks/main.yml @@ -75,7 +75,7 @@ mode: 0644 force: no -- name: "vdr configuration | copy channels.conf if it doesn't exist yes" +- name: "vdr configuration | copy channels.conf if it doesn't exist yet" copy: src: '{{ vdr_channels_conf }}' dest: '{{ vdr.confdir }}/channels.conf' @@ -84,6 +84,16 @@ mode: 0644 force: no when: vdr_channels_conf is defined + +- name: "vdr configuration | download channels.conf if it doesn't exist yet" + get_url: + url: '{{ vdr_channels_conf_url }}' + dest: '{{ vdr.confdir }}/channels.conf' + owner: '{{ vdr.user }}' + group: '{{ vdr.group }}' + mode: 0644 + force: no + when: vdr_channels_conf is not defined and vdr_channels_conf_url is defined - name: create directory for vdr.service systemd drop-in files file: dest: '{{ item }}'