From 4e4791184a74f8d86d4e4521ed8249ed1bfa5442 Mon Sep 17 00:00:00 2001 From: Olatunde Alex-Oni Date: Wed, 4 Sep 2024 15:03:39 +0200 Subject: [PATCH] fix error thrown when unwanted_file_delete option is set to false --- tasks/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tasks/main.yml b/tasks/main.yml index a4f6f25..aaa4ce1 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -66,7 +66,7 @@ ansible.builtin.file: path: "{{ item.1.path }}" state: absent - loop: "{{ unwanted_files.results | subelements('files') }}" + loop: "{{ unwanted_files.results | d([]) | subelements('files') }}" loop_control: label: "{{ item.1.path }}" when: