# Dynamic hosts configuration

**URL:** <https://forum.ansible.com/t/dynamic-hosts-configuration/14357>\
**Category:** Ansible Project\
**Created:** [January 16, 2014, 2:53am UTC](https://forum.ansible.com/t/dynamic-hosts-configuration/14357 "2014-01-16T02:53:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryanchan404](https://avatars.discourse-cdn.com/v4/letter/r/ee59a6/32.png) [@ryanchan404](https://forum.ansible.com/u/ryanchan404)\
**Post date:** [January 16, 2014, 2:53am UTC](https://forum.ansible.com/t/dynamic-hosts-configuration/14357/1 "2014-01-16T02:53:06Z")

</div>

Hello

One of the issue we experienced is when one host in the inventory goes down, Ansible talke time to discover and slow down the deployment process.

I am thinking if it is possible to provide the hosts dynamically, e.g. via an external API, [http://www.example.com/hosts\_list.php](http://www.example.com/hosts_list.php), so everytime I add or remove the hosts, I don’t need to update the host file and commit into our git repository.

Any idea?

---

<div class="post-metadata">

**Author:** ![sivel](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/sivel/32/1198_2.png) [@sivel](https://forum.ansible.com/u/sivel)\
**Post date:** [January 16, 2014, 3:08am UTC](https://forum.ansible.com/t/dynamic-hosts-configuration/14357/2 "2014-01-16T03:08:48Z")

</div>

It is possible. See [http://docs.ansible.com/developing\_inventory.html](http://docs.ansible.com/developing_inventory.html)

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan2](https://avatars.discourse-cdn.com/v4/letter/m/da6949/32.png) [@Michael\_DeHaan2](https://forum.ansible.com/u/Michael_DeHaan2)\
**Post date:** [January 16, 2014, 3:10am UTC](https://forum.ansible.com/t/dynamic-hosts-configuration/14357/3 "2014-01-16T03:10:59Z")

</div>

We filter disabled instances out of inventory for AWX, actually.

You could do the same.

Though I’m curious what “slow” means to you, as well as “goes down” means. That should resolve fairly quickly.
