How to specify ANSIBLE_CONSUL_URL for consul_kv lookup?

174 views
Skip to first unread message

Barry Kaplan

unread,
Jun 17, 2016, 9:57:17 PM6/17/16
to Ansible Project
This plugin uses os.environ['ANSIBLE_CONSUL_URL'] to get the consul url, defaulting to http://localhost:8500 if not set. This works fine when run on the host node where consul is running. 

How would I set a dynamically environment set a host env when this lookup is running local?

I have hacked the source to allow for getting host and port from params, eg:

                consul_api = consul.Consul(host=params['consul_host'], port=params['consul_port'])

I am happy to provide a PR for this, but would for sure like to get rid of my local copy. 
Reply all
Reply to author
Forward
0 new messages