From 77c910c1c3ecc228dbff6b6b9efa30513db73e8a Mon Sep 17 00:00:00 2001
From: Matthew Mosesohn <matthew.mosesohn@gmail.com>
Date: Mon, 2 Jul 2018 15:37:37 +0300
Subject: [PATCH] Fixup vault etcd check (#2938)

* Fixup vault etcd

* Update main.yml
---
 roles/vault/tasks/shared/check_etcd.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/roles/vault/tasks/shared/check_etcd.yml b/roles/vault/tasks/shared/check_etcd.yml
index eaa951114..9ebed2bf1 100644
--- a/roles/vault/tasks/shared/check_etcd.yml
+++ b/roles/vault/tasks/shared/check_etcd.yml
@@ -2,7 +2,7 @@
 
 - name: check_etcd | Check if etcd is up and reachable
   uri:
-    url: "{{ vault_etcd_url }}/health"
+    url: "{{ vault_etcd_url.split(',') | first }}/health"
     validate_certs: no
     client_cert: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}.pem"
     client_key: "{{ etcd_cert_dir }}/node-{{ inventory_hostname }}-key.pem"
@@ -26,5 +26,5 @@
   fail:
     msg: >
          Unable to start Vault cluster! Etcd is not available at
-         {{ vault_etcd_url }} however it is needed by Vault as a backend.
+         {{ vault_etcd_url.split(',') | first }} however it is needed by Vault as a backend.
   when: vault_etcd_needed|d() and not vault_etcd_available
-- 
GitLab