Access inventory file content during connection plugin run

7 views
Skip to first unread message

Alexandru Obretin

unread,
Sep 25, 2019, 11:47:20 AM9/25/19
to Ansible Development
Hi,

I have developed a httpapi connection plugin for Ansible and whenever I execute a playbook (ansible-playbook playbook.yml -i hosts) I run inside an extra ansible-inventory --list command to read the vars associated to the inventory.

Is there any alternative to access the vars for the current host? Or is there a way to find during the execution the argv of "ansible-playbook playbook.yml -i hosts" to identify where the hosts file is located?

Regards,
Alex
Reply all
Reply to author
Forward
0 new messages