Ansible test frameworks ?

58 views
Skip to first unread message

Michael Bright

unread,
May 9, 2016, 10:51:18 AM5/9/16
to Ansible Project


I want to do some testing across multiple hosts (of an OpenStack platform) and I'd really like to base this on Ansible to take advantage of the inventory management.

However, I really don't want the standard ansible-playbook output, even in check mode, I'd like something where I can craft the output.

I'd like to avoid reinventing the wheel, just like I'd like to avoid making bad implementation choices but I'm surprised not to find an existing framework as it seems such a good use case for Ansible.

So not having found anything it strikes me that I could
- use the Ansible API ... seems to be a no no as there seem to be no guarantees of stability across releases
- write a python wrapper which invokes ansible via the command-line and parses the output ... not very nice

I'm sure I've missed something obvious.
Any pointers?

Thanks,
Mike.



Matt Martz

unread,
May 9, 2016, 11:42:46 AM5/9/16
to ansible...@googlegroups.com
You could still use an ansible playbook, but utilize a different callback plugin, to output the data in the method you can use.  There is a `json` stdout callback plugin, that can return results of the playbook in JSON format.

--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/eb45b27e-4eb4-4791-9a95-ad8e500104de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Matt Martz
@sivel
sivel.net
Reply all
Reply to author
Forward
0 new messages