From 9f5aed800a809a10688e6f0364fca52c2df462d7 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Wed, 16 Aug 2017 08:19:26 -0500 Subject: [PATCH] Retry updating apt-cache The original mirror script had a retry loop that turns out to be important given that we have mirror connection hiccups. Add a retry loop to our updating of the apt-cache so that we don't have to recycle entire nodes. Change-Id: I6157cd4fded020bdbe2872a4041bd3001eb0b1d2 --- roles/configure-mirrors/tasks/mirror.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/roles/configure-mirrors/tasks/mirror.yaml b/roles/configure-mirrors/tasks/mirror.yaml index 1f041e396..eb0d95f29 100644 --- a/roles/configure-mirrors/tasks/mirror.yaml +++ b/roles/configure-mirrors/tasks/mirror.yaml @@ -25,3 +25,6 @@ apt: update_cache: yes when: ansible_os_family == 'Debian' + register: apt_cache + until: "'cache_updated' in apt_cache" + retries: 3