From 3694657eb6f9a4e6e8b3a82df86a9b76c17fecda Mon Sep 17 00:00:00 2001
From: Brad Beam <brad.beam@b-rad.info>
Date: Sat, 9 Dec 2017 17:39:43 -0600
Subject: [PATCH] Adding retries for vault-init to come online

---
 roles/vault/tasks/bootstrap/start_vault_temp.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/roles/vault/tasks/bootstrap/start_vault_temp.yml b/roles/vault/tasks/bootstrap/start_vault_temp.yml
index 49585a5d9..1048b8c3e 100644
--- a/roles/vault/tasks/bootstrap/start_vault_temp.yml
+++ b/roles/vault/tasks/bootstrap/start_vault_temp.yml
@@ -25,6 +25,9 @@
     body:
       secret_shares: 1
       secret_threshold: 1
+  until: "vault_temp_init|succeeded"
+  retries: 4
+  delay: "{{ retry_stagger | random + 3 }}"
   register: vault_temp_init
 
 # NOTE: vault_headers and vault_url are used by subsequent issue calls
-- 
GitLab