From 9ba12875a0366003325d06c090b4f78efb830134 Mon Sep 17 00:00:00 2001 From: owine Date: Mon, 8 Jan 2024 20:42:59 -0600 Subject: [PATCH] Plex-Reset-Codecs: Convert to block --- roles/plex/tasks/main2.yml | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/roles/plex/tasks/main2.yml b/roles/plex/tasks/main2.yml index 1af709e4c8..08e512aadd 100644 --- a/roles/plex/tasks/main2.yml +++ b/roles/plex/tasks/main2.yml @@ -37,18 +37,21 @@ - "{{ plex_paths_location }}/99-modify-binary" - "{{ server_appdata_path }}/scripts/bbe" -- name: Get contents of Plex Codecs Folder - ansible.builtin.find: - path: "{{ plex_paths_application_support_location }}/Codecs" - excludes: '.device-id' - register: plex_codecs_removal - -- name: Delete Plex Codecs Folder - ansible.builtin.file: - path: "{{ item.path }}" - state: absent - with_items: "{{ plex_codecs_removal.files }}" +- name: Plex Reset Codecs tasks when: ('plex-reset-codecs' in ansible_run_tags) + block: + + - name: Get contents of Plex Codecs Folder + ansible.builtin.find: + path: "{{ plex_paths_application_support_location }}/Codecs" + excludes: '.device-id' + register: plex_codecs_removal + + - name: Delete Plex Codecs Folder + ansible.builtin.file: + path: "{{ item.path }}" + state: absent + with_items: "{{ plex_codecs_removal.files }}" - name: Pre-Install Tasks ansible.builtin.import_tasks: "subtasks/pre-install/main.yml"