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) != [])