# Action plugin's "self.runner.inventory" in 2.0

**URL:** <https://forum.ansible.com/t/action-plugins-self-runner-inventory-in-2-0/22323>\
**Category:** Ansible Project\
**Created:** [August 18, 2016, 9:34pm UTC](https://forum.ansible.com/t/action-plugins-self-runner-inventory-in-2-0/22323 "2016-08-18T21:34:03Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![jmc](https://avatars.discourse-cdn.com/v4/letter/j/e36b37/32.png) [@jmc](https://forum.ansible.com/u/jmc)\
**Post date:** [August 18, 2016, 9:34pm UTC](https://forum.ansible.com/t/action-plugins-self-runner-inventory-in-2-0/22323/1 "2016-08-18T21:34:03Z")

</div>

Hi,

I have an action plugin that was originally written for Ansible 1, and I’m trying to port it over to 2. The plugin uses runner.inventory to programmatically create host and group variables for every host in the inventory. With the Ansible 2.0 changes, “runner” no longer exists. Does Ansible 2.0 still expose the inventory structure to action plugins?

Thank you for your time,  
Joseph

---

<div class="post-metadata">

**Author:** ![Matt\_Davis](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Matt\_Davis](https://forum.ansible.com/u/Matt_Davis)\
**Post date:** [August 18, 2016, 10:18pm UTC](https://forum.ansible.com/t/action-plugins-self-runner-inventory-in-2-0/22323/2 "2016-08-18T22:18:39Z")

</div>

Heh, I bet I know what you’re up to… 😉

It’s not exposed in the same way under 2.x anymore. There are still ways to root around in inventory from an action plugin under 2.x (eg, self.\_templar.\_available\_variables), but the objects are effectively immutable, since 2.x action plugins run in a fork (ie, changes made would be discarded when the fork exits).

Drop me a note- I have some ideas about how to do what I suspect you’re trying to do…

-Matt
