[ansible-devel] Re: v2 callback plugin migration
I've been looking around for a while for the same thing for action plugins. As I've not been able to find the answer, here is what I came for. Within the ActionModule class, you can get an inventory with : inventory = InventoryManager(self._loader, C.DEFAULT_HOST_LIST) To access to the host variables, you can do : inventory.get_host(self._connection.host).vars You also need these imports : from ansible.inventory.manager import InventoryManager from ansible import constants as C Hope this will help someone as I've been searching this for a while !!! -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [ansible-devel] Re: Where to put module guides
On Wednesday, 29 August 2018 20.18.55 CEST acoz...@redhat.com wrote: > Thanks for the post and for your interest in making the docs more complete. > Depending on the content you want to add, the scenario_guides section might > be a great place. > > I'd recommend you open a PR that adds a guide for using expect under > scenario_guides - if the content fits better elsewhere, we can discuss > moving it once it's written. Thanks Alicia, I'll start on a PR and we'll see where it end up. -- Kai Stian Olstad -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[ansible-devel] How do i run python scripts which includes imports from other .py files in the same directory.
Hi, I have a python script which imports other external python modules. i have copied all the .py files to a directory in the remote host. But, when i try to run the script file, it gives me an error "ImportError: No module named xyz". I am executing the abc.py file via the scripy module and inside the abc.py, i am importing the xyz.py python file. -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.