From 749eb19a3d786a4bbc911e73d28b61b0b8a9adba Mon Sep 17 00:00:00 2001 From: Jiri Macku Date: Wed, 26 Jun 2019 16:26:46 +0200 Subject: [PATCH 1/2] Retry on yum failures --- tasks/redhat.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tasks/redhat.yml b/tasks/redhat.yml index 70cb59f..bda4127 100644 --- a/tasks/redhat.yml +++ b/tasks/redhat.yml @@ -1,6 +1,12 @@ --- - name: Install the required packages in Redhat derivatives - yum: name=chrony state={{ chrony_pkg_state }} + yum: + name=chrony + state={{ chrony_pkg_state }} + register: yum_result + until: yum_result is success + retries: 3 + delay: 10 - name: Check if ntpd service exists stat: path="/usr/lib/systemd/system/ntpd.service" From c8239d59d64d5962e1949af1bdac211a6ac98cca Mon Sep 17 00:00:00 2001 From: Jiri Macku Date: Wed, 26 Jun 2019 16:43:35 +0200 Subject: [PATCH 2/2] Retry on yum failures --- tasks/redhat.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tasks/redhat.yml b/tasks/redhat.yml index bda4127..7190c4a 100644 --- a/tasks/redhat.yml +++ b/tasks/redhat.yml @@ -1,8 +1,8 @@ --- - name: Install the required packages in Redhat derivatives yum: - name=chrony - state={{ chrony_pkg_state }} + name: chrony + state: "{{ chrony_pkg_state }}" register: yum_result until: yum_result is success retries: 3