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?
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…