From 4550dccb845df9eb8d7d1a0b942c4499bc9b0aab Mon Sep 17 00:00:00 2001
From: Brad Beam <bradbeam@users.noreply.github.com>
Date: Thu, 24 Aug 2017 15:21:39 -0500
Subject: [PATCH] Fixing reference to vault leader url (#1569)

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

diff --git a/roles/vault/tasks/bootstrap/main.yml b/roles/vault/tasks/bootstrap/main.yml
index 98904bbe7..83167ace7 100644
--- a/roles/vault/tasks/bootstrap/main.yml
+++ b/roles/vault/tasks/bootstrap/main.yml
@@ -22,6 +22,12 @@
         inventory_hostname == groups.vault|first and
         not vault_cluster_is_initialized
 
+# Set vault_leader_url for all nodes based on above
+- name: vault | bootstrap
+  set_fact:
+    vault_leader_url: "{{ hostvars[groups.vault|first]['vault_leader_url'] }}"
+  when: not vault_cluster_is_initialized
+
 # NOTE: The next 2 steps run against temp Vault and long-term Vault
 
 # Ensure PKI mount exists
-- 
GitLab