Ansible log plugin to output XML

475 views
Skip to first unread message

Mark Phillips

unread,
Mar 19, 2014, 12:55:49 PM3/19/14
to ansible...@googlegroups.com
Hello folks,

Not something I'd ordinarily advocate - XML (eugh) - but I was wondering if anybody had done anything with producing run log output as XML?

I'm looking at it so I can plug Ansible testing into a CI solution, in this case specifically Bamboo. I can make use of the JUnit processor with XML output.

Before I start faffing about actually doing this, I was wondering if anybody had done anything similar - even if it's with Jenkins or the likes.

Cheers,

--Mark

Sergio Freire

unread,
Mar 29, 2014, 6:12:10 PM3/29/14
to ansible...@googlegroups.com
Hello,
i'm also searching for the same but still with no luck. I saw some wrappers using perl test::unit and prove but I personaly don't like that solution
Regards,
Sergio

Mark Phillips

unread,
Mar 31, 2014, 3:42:45 PM3/31/14
to ansible...@googlegroups.com
Hello Sergio,

Where did you see that solution? Wouldn't have a link you could share would you please?

TBH anything would be a good start. There is a TAP plugin for Bamboo, so a wrapper outputting TAP would be great (I actually started to look at PyTAP yesterday, and wondered if I could make use of callbacks to output TAP formatted checks to --list-tasks --list-hosts --syntax-check)

Cheers

Serge van Ginderachter

unread,
Mar 31, 2014, 3:47:02 PM3/31/14
to ansible...@googlegroups.com
​Nothing concretely, but you might want to look at callback_plugins to interface your xml, I think.​

c...@berkeley.edu

unread,
Apr 30, 2015, 7:24:23 PM4/30/15
to ansible...@googlegroups.com
Sorry to answer an old thread, but when I search for Ansible JUnit output, this thread comes up.

I hacked up a script that generates JUnit XML output from an Ansible run, see https://gist.github.com/cxbrooks/a6e6ce6013e7324398ea

_Christopher

c...@berkeley.edu

unread,
Apr 30, 2015, 7:24:23 PM4/30/15
to ansible...@googlegroups.com
The formatting was messed up the gist.  Copy and paste from Emacs was not pretty.

I've created https://github.com/cxbrooks/ansible-junitxml  and done a pull request to the master at https://github.com/seancron/ansible-junitxml


On Monday, March 31, 2014 at 12:47:02 PM UTC-7, Serge van Ginderachter wrote:
Reply all
Reply to author
Forward
0 new messages