diff --git a/roles/download/tasks/set_container_facts.yml b/roles/download/tasks/set_container_facts.yml
index 68ad194d99f6af0ebafed8e007c90a8567c32fe3..2b664022996b7d8a21066982b17ce1075a077f23 100644
--- a/roles/download/tasks/set_container_facts.yml
+++ b/roles/download/tasks/set_container_facts.yml
@@ -5,8 +5,7 @@
 
 - name: set_container_facts | Set if containers should be pulled by digest
   set_fact:
-    pull_by_digest: >-
-      {%- if download.sha256 is defined and download.sha256 -%}true{%- else -%}false{%- endif -%}
+    pull_by_digest: "{{ download.sha256 is defined and download.sha256 }}"
 
 - name: set_container_facts | Define by what name to pull the image
   set_fact: