From fac20bb529215737014ab47b8e0aeaa64f88c7a6 Mon Sep 17 00:00:00 2001 From: Michael Gugino Date: Mon, 30 Oct 2017 10:47:03 -0400 Subject: Add retry logic to docker auth credentials This commit enables retry on docker login commands. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1506931 --- roles/docker/tasks/registry_auth.yml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'roles/docker/tasks') diff --git a/roles/docker/tasks/registry_auth.yml b/roles/docker/tasks/registry_auth.yml index 65ed60efa..d05b7f2b8 100644 --- a/roles/docker/tasks/registry_auth.yml +++ b/roles/docker/tasks/registry_auth.yml @@ -7,6 +7,10 @@ - name: Create credentials for docker cli registry auth command: "docker --config={{ docker_cli_auth_config_path }} login -u {{ oreg_auth_user }} -p {{ oreg_auth_password }} {{ oreg_host }}" + register: openshift_docker_credentials_create_res + retries: 3 + delay: 5 + until: openshift_docker_credentials_create_res.rc == 0 when: - oreg_auth_user is defined - (not docker_cli_auth_credentials_stat.stat.exists or oreg_auth_credentials_replace) | bool -- cgit v1.2.3