From f6e4a231cb4135a59db5b5186c58cf15aa922c2a Mon Sep 17 00:00:00 2001
From: Maxime Picaud <maxime.picaud@harchibald.com>
Date: Thu, 23 Mar 2023 16:04:32 +0100
Subject: [PATCH] fix(download): validate mirrors on localhost (#9669)

---
 roles/download/tasks/download_file.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/roles/download/tasks/download_file.yml b/roles/download/tasks/download_file.yml
index ee1eaad70..3bddd7448 100644
--- a/roles/download/tasks/download_file.yml
+++ b/roles/download/tasks/download_file.yml
@@ -63,6 +63,7 @@
     delegate_to: "{{ download_delegate if download_force_cache else inventory_hostname }}"
     run_once: "{{ download_force_cache }}"
     register: uri_result
+    become: "{{ not download_localhost }}"
     until: uri_result is success
     retries: "{{ download_retries }}"
     delay: "{{ retry_stagger | default(5) }}"
-- 
GitLab