# with\_consul\_kv ANSIBLE\_CONSUL\_URL environment.

**URL:** <https://forum.ansible.com/t/with-consul-kv-ansible-consul-url-environment/23833>\
**Category:** Ansible Project\
**Created:** [February 27, 2017, 9:07pm UTC](https://forum.ansible.com/t/with-consul-kv-ansible-consul-url-environment/23833 "2017-02-27T21:07:50Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Christopher\_Warner](https://avatars.discourse-cdn.com/v4/letter/c/9de053/32.png) [@Christopher\_Warner](https://forum.ansible.com/u/Christopher_Warner)\
**Post date:** [February 27, 2017, 9:07pm UTC](https://forum.ansible.com/t/with-consul-kv-ansible-consul-url-environment/23833/1 "2017-02-27T21:07:50Z")

</div>

I want to resurrect a currently closed issue [https://github.com/ansible/ansible/issues/16398](https://github.com/ansible/ansible/issues/16398). I’m just trying to understand why with\_consul\_kv looks for the env variable ANSIBLE\_CONSUL\_URL and we just don’t make this an ansible variable. The problem i’m having is using it with tower as I can’t control the environment var from there and because the way this is written it would need to happen in the ansible-playbook exec environment. All work arounds involve either writing my own module or adding the consul agent as a dep. Is there some reason we can’t just modify with\_consul\_kv to look for a predefined var, or at the very least because that would be a breaking change to remove it, add some logic to also check for a predefined var? Anyone else see any problems with this?
