From a54c5832a350781c5996fef0ca4e7b394be055d5 Mon Sep 17 00:00:00 2001 From: Otthorn Date: Thu, 28 Jan 2021 00:07:23 +0100 Subject: [PATCH] Apt retry mechanism --- roles/dovecot/tasks/main.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/roles/dovecot/tasks/main.yml b/roles/dovecot/tasks/main.yml index 8e4ce5f..74669f9 100644 --- a/roles/dovecot/tasks/main.yml +++ b/roles/dovecot/tasks/main.yml @@ -2,6 +2,7 @@ # Install and configure Dovecot - name: Install Dovecot apt: + update_cache: true name: - dovecot-core - dovecot-imapd @@ -9,7 +10,9 @@ - dovecot-lmtpd - dovecot-ldap - dovecot-pop3d - update_cache: true + register: apt_result + retries: 3 + until: apt_result is succeeded # Create the vmail user with UID and GID 5000 - name: Create vmail user