# Using consul for dynamic inventory

**URL:** <https://forum.ansible.com/t/using-consul-for-dynamic-inventory/22752>\
**Category:** Ansible Project\
**Created:** [October 9, 2016, 4:33am UTC](https://forum.ansible.com/t/using-consul-for-dynamic-inventory/22752 "2016-10-09T04:33:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mike\_Mester](https://avatars.discourse-cdn.com/v4/letter/m/b5e925/32.png) [@Mike\_Mester](https://forum.ansible.com/u/Mike_Mester)\
**Post date:** [October 9, 2016, 4:33am UTC](https://forum.ansible.com/t/using-consul-for-dynamic-inventory/22752/1 "2016-10-09T04:33:40Z")

</div>

Hello,

I am looking to utilize consul to dynamically update my inventory system for ansible. Here is the scenario:

I am running openstack and using the openstack provisioning features in ansible. The instances get a dynamic ip address. What i need to be able to do is take that ip address and use it to ssh into the newly created node to finish my install. Here is a snip from the playbook. As you can see I am able to completely populate the consul K/V store with the ip address of the new instance.

Question is how can i tell ansible to use that IP to perform its followup tasks. (i.e. sshing to the new instance to run commands)

Thanks,

Mike

`
