From fbb4e1ca73fd39ce9f18fa7c6f05766ccb0e484a Mon Sep 17 00:00:00 2001 From: Luke Meyer Date: Tue, 28 Nov 2017 15:46:50 -0500 Subject: retry package operations When a package install/update fails due to network blips or other spotty availability, retry it. If the failure is a real failure (e.g. package is really not there) it still fails after 3 tries (Ansible default). --- roles/openshift_cli/tasks/main.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roles/openshift_cli') diff --git a/roles/openshift_cli/tasks/main.yml b/roles/openshift_cli/tasks/main.yml index 6aa15d568..7b046b2c4 100644 --- a/roles/openshift_cli/tasks/main.yml +++ b/roles/openshift_cli/tasks/main.yml @@ -8,6 +8,8 @@ - name: Install clients package: name={{ openshift.common.service_type }}-clients state=present when: not openshift.common.is_containerized | bool + register: result + until: result | success - block: - name: Pull CLI Image @@ -47,3 +49,5 @@ - name: Install bash completion for oc tools package: name=bash-completion state=present when: not openshift.common.is_containerized | bool + register: result + until: result | success -- cgit v1.2.1