From 8e8751465beb0675520f0e80d3c1b696e2bc5171 Mon Sep 17 00:00:00 2001 From: Max Gautier Date: Wed, 9 Sep 2026 05:24:34 +0000 Subject: [PATCH] fix/ansible-core 2.19: implicit list to bool conversion in download (#13470) --- roles/download/tasks/check_pull_required.yml | 3 +-- roles/download/tasks/main.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/roles/download/tasks/check_pull_required.yml b/roles/download/tasks/check_pull_required.yml index 585013125..d367dd279 100644 --- a/roles/download/tasks/check_pull_required.yml +++ b/roles/download/tasks/check_pull_required.yml @@ -10,8 +10,7 @@ - name: Check_pull_required | Set pull_required if the desired image is not yet loaded set_fact: - pull_required: >- - {%- if image_reponame | regex_replace('^docker\.io/(library/)?', '') in docker_images.stdout.split(',') %}false{%- else -%}true{%- endif -%} + pull_required: "{{ (image_reponame | regex_replace('^docker\\.io/(library/)?', '')) not in docker_images.stdout.split(',') }}" when: not download_always_pull - name: Check_pull_required | Check that the local digest sha256 corresponds to the given image tag diff --git a/roles/download/tasks/main.yml b/roles/download/tasks/main.yml index 828a40f9e..9139d009b 100644 --- a/roles/download/tasks/main.yml +++ b/roles/download/tasks/main.yml @@ -27,4 +27,4 @@ - download.enabled - item.value.enabled - (not download.container) or (download.container and download_container) - - (download_run_once and inventory_hostname == download_delegate) or (group_names | intersect(download.groups) | length) + - (download_run_once and inventory_hostname == download_delegate) or (group_names | intersect(download.groups) != [])