diff --git a/contrib/inventory/consul_io.py b/contrib/inventory/consul_io.py index 9130dbd9e72..cf622ed6c4a 100755 --- a/contrib/inventory/consul_io.py +++ b/contrib/inventory/consul_io.py @@ -465,6 +465,7 @@ class ConsulConfig(dict): host = 'localhost' port = 8500 token = None + scheme = 'http' if hasattr(self, 'url'): from urlparse import urlparse @@ -473,11 +474,13 @@ class ConsulConfig(dict): host = o.hostname if o.port: port = o.port + if o.scheme: + scheme = o.scheme if hasattr(self, 'token'): token = self.token if not token: token = 'anonymous' - return consul.Consul(host=host, port=port, token=token) + return consul.Consul(host=host, port=port, token=token, scheme=scheme) ConsulInventory()