Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to retrieve all the nodes-variables list from ansible inventory file using 'all' keyword using get_host method #392

Open
VigneshwaranRavi opened this issue Dec 19, 2018 · 0 comments

Comments

@VigneshwaranRavi
Copy link

VigneshwaranRavi commented Dec 19, 2018

when i am trying to retrieve the variable list for a specific hostname from a specific ansible inventory using get_host method it works fine like this.

import testinfra
test_host1 = testinfra.get_host("ansible://master-r1c1.cluster.local?ansible_inventory=ocp.localhost")
print(test_host1.ansible.get_variables())

The ouput is fine

but when i try to give 'all ' keyword instead of 'master-r1c1.cluster.local' it display only the list of host names under each groups in ansible inventory file using get_host() and get_hosts() methods.

I want output similar to this ansible-inventory CLI command

ansible-inventory --inventory ocp.localhost --list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant