# vars plugin and host/group vars

**URL:** <https://forum.ansible.com/t/vars-plugin-and-host-group-vars/20190>\
**Category:** Ansible Project\
**Tags:** rhel\
**Created:** [January 13, 2016, 5:34am UTC](https://forum.ansible.com/t/vars-plugin-and-host-group-vars/20190 "2016-01-13T05:34:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Dewey](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@John\_Dewey](https://forum.ansible.com/u/John_Dewey)\
**Post date:** [January 13, 2016, 5:34am UTC](https://forum.ansible.com/t/vars-plugin-and-host-group-vars/20190/1 "2016-01-13T05:34:37Z")

</div>

I’m using a custom vars plugin[1] under ansible 1.9. In 1.9 by calling `host.get_variables()`, I would get back a set of combined host and group vars. However, under ansible 2.0, this is not the case. I’ve been scouring the code, looking for similar functionality. Could someone give me an idea of how to accomplish the equivalent in 2.0? I’m looking for the combined host/group vars from my inventory.

(Epdb) host.get\_vars()  
{‘inventory\_hostname’: u’mhv-rhel-7’, ‘group\_names’: [u’mhv’, u’vagrant’], ‘inventory\_hostname\_short’: u’mhv-rhel-7’}

[1] [https://github.com/blueboxgroup/ursula/blob/master/plugins/vars/default\_vars.py#L60](https://github.com/blueboxgroup/ursula/blob/master/plugins/vars/default_vars.py#L60)

---

<div class="post-metadata">

**Author:** ![John\_Dewey](https://avatars.discourse-cdn.com/v4/letter/j/b9bd4f/32.png) [@John\_Dewey](https://forum.ansible.com/u/John_Dewey)\
**Post date:** [January 14, 2016, 6:08am UTC](https://forum.ansible.com/t/vars-plugin-and-host-group-vars/20190/2 "2016-01-14T06:08:14Z")

</div>

A follow up to this.

[https://github.com/ansible/ansible/issues/13873](https://github.com/ansible/ansible/issues/13873)
