pytest-testinfra
pytest-testinfra copied to clipboard
get variables from ansible playbook
added parameter --ansible-playbook. for example --ansible-playbook=test-playbook.yml the process of applying variables in "vars" in the playbook is:
- applying variables from play with "all" value of "hosts" directive
- applying variables from play with hostname value of "hosts" directive
Hi, this looks interesting, thanks for this.
However I think i'd be preferable to pass the playbook file in ansible.get_variables(playbook="/path/to/playbook.yml")
(from the ansible module). Rather than from the command line. This would allow to read variables from any playbook.
I think, both sources of "playbook" can stay. What do you think? If you insist on one variant, I'll do that.
Build succeeded (third-party-check pipeline).
- system-config-run-base-ansible-devel : SUCCESS in 14m 28s
Build failed (third-party-check pipeline) integration testing with OpenStack. For information on how to proceed, see http://docs.openstack.org/infra/manual/developers.html#automated-testing
- system-config-run-base-ansible-devel : FAILURE in 19m 08s
Build succeeded (third-party-check pipeline).
- system-config-run-base-ansible-devel : SUCCESS in 19m 24s