From 2c21c44d35d3ec8eb060ff50ebeb742b3d43f56b Mon Sep 17 00:00:00 2001 From: jgoutin Date: Tue, 5 Nov 2019 12:33:47 +0100 Subject: [PATCH] Allow to not specify cred.json or conf.json --- README.md | 4 ++-- defaults/main.yml | 2 -- tasks/main.yml | 4 ++++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 5f1d7f1..5d3df6e 100644 --- a/README.md +++ b/README.md @@ -32,9 +32,9 @@ Accelize DRM systemd service configuration. DRM Configuration: Accelize DRM configuration files. -* **accelize_drm_cred_src**: Path to the local `cred.json` file to transfer to the host. Default to `cred.json`. +* **accelize_drm_cred_src**: Path to the local `cred.json` file to transfer to the host. If not specified, does not transfer file. * **accelize_drm_cred_dst**: Destination path of the `cred.json` file on the target host. Default to `/root/.accelize_drm/cred.json`. -* **accelize_drm_conf_src**: Path to the local `conf.json` file to transfer to the host. Default to `conf.json`. +* **accelize_drm_conf_src**: Path to the local `conf.json` file to transfer to the host. If not specified, does not transfer file. * **accelize_drm_conf_dst**: Destination path of the `conf.json` file on the target host. Default to `/etc/accelize_drm/conf.json`. Source installation, test & build requirements: diff --git a/defaults/main.yml b/defaults/main.yml index 10719a6..70dba76 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -8,9 +8,7 @@ accelize_repository_channel: stable accelize_drm_from_source: false # Accelize DRM credential and configuration files -accelize_drm_cred_src: cred.json accelize_drm_cred_dst: /root/.accelize_drm/cred.json -accelize_drm_conf_src: conf.json accelize_drm_conf_dst: /etc/accelize_drm/conf.json # FPGA driver to use with Accelize DRM service diff --git a/tasks/main.yml b/tasks/main.yml index 8037d40..a218bd5 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -324,21 +324,25 @@ file: path: "{{ accelize_drm_cred_dst | dirname }}" state: directory + when: accelize_drm_cred_src is defined - name: Create Accelize DRM credentials file copy: src: "{{ accelize_drm_cred_src }}" dest: "{{ accelize_drm_cred_dst }}" + when: accelize_drm_cred_src is defined - name: Ensure Accelize DRM configuration parent directory exists file: path: "{{ accelize_drm_conf_dst | dirname }}" state: directory + when: accelize_drm_conf_src is defined - name: Create Accelize DRM configuration file copy: src: "{{ accelize_drm_conf_src }}" dest: "{{ accelize_drm_conf_dst }}" + when: accelize_drm_conf_src is defined - name: Ensure Accelize DRM service parent directory exists file: