# ERROR! the field 'hosts' is required but was not set

**URL:** <https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/34015>\
**Category:** Ansible Project\
**Created:** [October 12, 2020, 7:44pm UTC](https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/34015 "2020-10-12T19:44:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Subhash\_Chandra\_Rang](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Subhash\_Chandra\_Rang](https://forum.ansible.com/u/Subhash_Chandra_Rang)\
**Post date:** [October 12, 2020, 7:44pm UTC](https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/34015/1 "2020-10-12T19:44:33Z")

</div>



---

<div class="post-metadata">

**Author:** ![vinod93pop](https://avatars.discourse-cdn.com/v4/letter/v/ea5d25/32.png) [@vinod93pop](https://forum.ansible.com/u/vinod93pop)\
**Post date:** [October 13, 2020, 8:36pm UTC](https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/34015/2 "2020-10-13T20:36:50Z")

</div>

Are you using ansible tower/awx or in command line?  
How your inventory file looks like?  
//vinoth

---

<div class="post-metadata">

**Author:** ![Subhash\_Chandra\_Rang](https://avatars.discourse-cdn.com/v4/letter/s/fbc32d/32.png) [@Subhash\_Chandra\_Rang](https://forum.ansible.com/u/Subhash_Chandra_Rang)\
**Post date:** [October 13, 2020, 11:21pm UTC](https://forum.ansible.com/t/error-the-field-hosts-is-required-but-was-not-set/34015/3 "2020-10-13T23:21:08Z")

</div>

Hej thank you for response the cause of error is due to handlers they are not placed correctly after I have done that it works fine 😊
