From 33e1453d5a2204289d2281387927310c929f089d Mon Sep 17 00:00:00 2001 From: provonet Date: Fri, 25 May 2018 16:13:48 +0200 Subject: [PATCH] support url scheme (#39683) --- lib/ansible/plugins/lookup/consul_kv.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/plugins/lookup/consul_kv.py b/lib/ansible/plugins/lookup/consul_kv.py index 1bfa8c6ecb3..29949159745 100644 --- a/lib/ansible/plugins/lookup/consul_kv.py +++ b/lib/ansible/plugins/lookup/consul_kv.py @@ -93,7 +93,7 @@ class LookupModule(LookupBase): try: url = os.environ['ANSIBLE_CONSUL_URL'] u = urlparse(url) - consul_api = consul.Consul(host=u.hostname, port=u.port) + consul_api = consul.Consul(host=u.hostname, port=u.port, scheme=u.scheme) except KeyError: port = kwargs.get('port', '8500') host = kwargs.get('host', 'localhost')