From eced28f9a95eb09383116035f40329410bbbccc4 Mon Sep 17 00:00:00 2001 From: Jesse Pretorius Date: Fri, 30 Mar 2018 16:24:14 +0100 Subject: [PATCH] Add retries to requirement package install The requirement package install task includes two actions: 1. update the apt cache 2. install the packages from a remote mirror Both of these may fail due to transient issues and should therefore be retried. Change-Id: I992c045273646995a6d9cebb6ea10db214ff588a --- tasks/openstack_hosts_configure_apt.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tasks/openstack_hosts_configure_apt.yml b/tasks/openstack_hosts_configure_apt.yml index 49d2a5da..b7874c2e 100644 --- a/tasks/openstack_hosts_configure_apt.yml +++ b/tasks/openstack_hosts_configure_apt.yml @@ -40,6 +40,10 @@ state: "{{ openstack_hosts_package_state }}" update_cache: yes cache_valid_time: "{{ cache_timeout }}" + register: _install_packages + until: _install_packages | success + retries: 5 + delay: 2 - name: Remove any old UCA repository using the old filename file: