From 4686fac8623298bbbf7b3fc8254f308dacda1e38 Mon Sep 17 00:00:00 2001 From: Dmitriy Rabotyagov Date: Tue, 18 Jul 2023 08:41:30 +0200 Subject: [PATCH] Add retries to LXC base build command Sometimes there could be intermittent issues on some of the mirrors that would be picked while building the base image. In order to increases chances of image to build, we add a retries to increase chances to pick properly synced mirror. Change-Id: I5546ee71cce4f4b40fbd1d38d5d49586606bbbda --- tasks/lxc_cache_rootfs.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/lxc_cache_rootfs.yml b/tasks/lxc_cache_rootfs.yml index 1da72051..39f83673 100644 --- a/tasks/lxc_cache_rootfs.yml +++ b/tasks/lxc_cache_rootfs.yml @@ -78,3 +78,7 @@ command: "{{ lxc_hosts_container_build_command }}" when: lxc_hosts_container_build_command | length > 0 changed_when: false + register: _build_container_base_image + until: _build_container_base_image is success + retries: 5 + delay: 2