From 4d804b844b2ff8cabb2071e14af8f5f76b1148dd Mon Sep 17 00:00:00 2001 From: saltydk Date: Sat, 28 Oct 2023 11:26:18 +0200 Subject: [PATCH] cloudplow: only fail if config doesn't exist --- roles/cloudplow/tasks/subtasks/settings.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/roles/cloudplow/tasks/subtasks/settings.yml b/roles/cloudplow/tasks/subtasks/settings.yml index 9505073c52..c472d56915 100644 --- a/roles/cloudplow/tasks/subtasks/settings.yml +++ b/roles/cloudplow/tasks/subtasks/settings.yml @@ -7,13 +7,6 @@ # GNU General Public License v3.0 # ######################################################################### --- -- name: Settings | Fail if duplicate folders where found. - ansible.builtin.fail: - msg: - - "Duplicate upload folders found. This is likely an error on your part." - - "If not then supply your own configuration file at '{{ cloudplow_config_path }}' and rerun the previous tag." - when: (cloudplow_remotes | length) != (cloudplow_upload_paths_unique | length) - - name: Check if Plex instance is defined ansible.builtin.set_fact: plex_name: "{{ plex_name | default(plex_instances[0]) }}" @@ -41,6 +34,13 @@ - name: Settings | New 'config.json' tasks when: (not cloudplow_config.stat.exists) block: + - name: Settings | Fail if duplicate folders where found. + ansible.builtin.fail: + msg: + - "Duplicate upload folders found. This is likely an error on your part." + - "If not then supply your own configuration file at '{{ cloudplow_config_path }}' and rerun the previous tag." + when: (cloudplow_remotes | length) != (cloudplow_upload_paths_unique | length) + - name: Settings | Import 'config.json' ansible.builtin.template: src: config.json.j2