# junit callback Options example

**URL:** <https://forum.ansible.com/t/junit-callback-options-example/26149>\
**Category:** Ansible Project\
**Created:** [November 28, 2017, 12:03pm UTC](https://forum.ansible.com/t/junit-callback-options-example/26149 "2017-11-28T12:03:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Diego\_Lagos](https://avatars.discourse-cdn.com/v4/letter/d/f1d935/32.png) [@Diego\_Lagos](https://forum.ansible.com/u/Diego_Lagos)\
**Post date:** [November 28, 2017, 12:03pm UTC](https://forum.ansible.com/t/junit-callback-options-example/26149/1 "2017-11-28T12:03:41Z")

</div>

Hello,

I would like to use the junit callback ([http://docs.ansible.com/ansible/devel/plugins/callback/junit.html](http://docs.ansible.com/ansible/devel/plugins/callback/junit.html)), but I find no examples of how to configure the options.

Must be configured within the plyabook, within the file ansible.cfg?  
And how should they be written?

thx so much for your help

Diego Mauricio

---

<div class="post-metadata">

**Author:** ![Kai\_Stian\_Olstad](https://avatars.discourse-cdn.com/v4/letter/k/e19adc/32.png) [@Kai\_Stian\_Olstad](https://forum.ansible.com/u/Kai_Stian_Olstad)\
**Post date:** [November 28, 2017, 2:37pm UTC](https://forum.ansible.com/t/junit-callback-options-example/26149/2 "2017-11-28T14:37:34Z")

</div>

You have some explanation here  
[https://docs.ansible.com/ansible/devel/plugins/callback.html](https://docs.ansible.com/ansible/devel/plugins/callback.html)

---

<div class="post-metadata">

**Author:** ![Oliver1](https://avatars.discourse-cdn.com/v4/letter/o/eb9ed0/32.png) [@Oliver1](https://forum.ansible.com/u/Oliver1)\
**Post date:** [May 26, 2020, 4:23pm UTC](https://forum.ansible.com/t/junit-callback-options-example/26149/3 "2020-05-26T16:23:54Z")

</div>

Hello,

have the same problem.  
In the documentation it says that you should use environment variables to configure the output directory of the plugin.  
In this case I don’t see the point while using the junit callback from ansible which is not within a playbook. So the environment variables set like so are not working here.

Other callback plugins provide the option to set ini keys for configuration into ansible.cfg like:

`[callback_junit] output_dir = ~/.local/share/ansible/logs/junit/`

Unfortunately this is not working in my case. Any recommendations?

Regards Oliver

---

<div class="post-metadata">

**Author:** ![Tim\_Black](https://avatars.discourse-cdn.com/v4/letter/t/bcef8e/32.png) [@Tim\_Black](https://forum.ansible.com/u/Tim_Black)\
**Post date:** [April 9, 2021, 12:20am UTC](https://forum.ansible.com/t/junit-callback-options-example/26149/4 "2021-04-09T00:20:14Z")

</div>

Anyone make any headway on this issue?

I’m trying to use the j unit call back plug in and configuring it with environment variables per the recent documentation, but they don’t seem to be working.

In my case I’m running the ansible playbook from the Jenkins job where I’m setting up the environment variables in the Jenkins file environment section.
