From 0b5ccfa149a764cf661ea903332729d70383df06 Mon Sep 17 00:00:00 2001 From: Adrien Waksberg Date: Sun, 17 Feb 2019 08:49:47 +0100 Subject: [PATCH] fix: add retry for network tasks --- tasks/backend-dependencies-debian.yml | 4 ++++ tasks/backend-dependencies-redhat.yml | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/tasks/backend-dependencies-debian.yml b/tasks/backend-dependencies-debian.yml index 004693c..7419eb3 100644 --- a/tasks/backend-dependencies-debian.yml +++ b/tasks/backend-dependencies-debian.yml @@ -2,4 +2,8 @@ - name: install backend dependencies apt: name: python-requests + register: result + retries: 3 + delay: 1 + until: result is success tags: sensu diff --git a/tasks/backend-dependencies-redhat.yml b/tasks/backend-dependencies-redhat.yml index 38ef415..68f732a 100644 --- a/tasks/backend-dependencies-redhat.yml +++ b/tasks/backend-dependencies-redhat.yml @@ -7,6 +7,10 @@ packages: - python-urllib3 - python-requests + register: result + retries: 1 + delay: 1 + until: result is success tags: sensu - name: install backend dependencies @@ -16,4 +20,8 @@ packages: - urllib3 - requests + register: result + retries: 3 + delay: 1 + until: result is success tags: sensu