# localhost has group\_vars undefined

**URL:** <https://forum.ansible.com/t/localhost-has-group-vars-undefined/15743>\
**Category:** Ansible Project\
**Created:** [July 23, 2014, 3:08pm UTC](https://forum.ansible.com/t/localhost-has-group-vars-undefined/15743 "2014-07-23T15:08:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robert\_Osborne](https://avatars.discourse-cdn.com/v4/letter/r/eada6e/32.png) [@Robert\_Osborne](https://forum.ansible.com/u/Robert_Osborne)\
**Post date:** [July 23, 2014, 3:08pm UTC](https://forum.ansible.com/t/localhost-has-group-vars-undefined/15743/1 "2014-07-23T15:08:00Z")

</div>

In my inventory I have:

[buildserver]  
localhost ansible\_connection=local

But the playbooks associated with [buildserver] all fail with “undefined” variables; all the group\_vars associated with the playbook are seemingly unset for a localhost.

Ansible also seems to be very adroit at figuring out what localhost is … if I use the external IP address instead it works it out and again fails.

Note that buildserver and the matching playbooks all work on an external server with the same OS.

Any thoughts?

---

<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:** [July 23, 2014, 10:08pm UTC](https://forum.ansible.com/t/localhost-has-group-vars-undefined/15743/2 "2014-07-23T22:08:41Z")

</div>

Could we see more about your playbook structure?

Sounds like your group\_vars/ is not at the right location.

With the later part, I apologize in that I don’t know what “fails” means, so I will need more specifics as to the nature of the beast.
