# Need to avoid using a hosts or inventory file using Ansible

**URL:** <https://forum.ansible.com/t/need-to-avoid-using-a-hosts-or-inventory-file-using-ansible/15218>\
**Category:** Ansible Project\
**Created:** [May 12, 2014, 11:15pm UTC](https://forum.ansible.com/t/need-to-avoid-using-a-hosts-or-inventory-file-using-ansible/15218 "2014-05-12T23:15:07Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [May 23, 2014, 12:29pm UTC](https://forum.ansible.com/t/need-to-avoid-using-a-hosts-or-inventory-file-using-ansible/15218/21 "2014-05-23T12:29:41Z")

</div>

“Dynamic inventory scripts are not appropriate if the IP does not exist yet, as in the case of creating a new VM.”

Which is why “add\_host” exists to add things to a group.

---

<div class="post-metadata">

**Author:** ![Scott\_Anderson](https://avatars.discourse-cdn.com/v4/letter/s/ed655f/32.png) [@Scott\_Anderson](https://forum.ansible.com/u/Scott_Anderson)\
**Post date:** [May 23, 2014, 1:11pm UTC](https://forum.ansible.com/t/need-to-avoid-using-a-hosts-or-inventory-file-using-ansible/15218/22 "2014-05-23T13:11:04Z")

</div>

Seems to be an echo in here… 🙂

-scott

[Previous page](https://forum.ansible.com/t/need-to-avoid-using-a-hosts-or-inventory-file-using-ansible/15218.md?page=1)
