# Does Ansible Runner allow user-friendly \`job\_events\` JSON file Names?

**URL:** <https://forum.ansible.com/t/does-ansible-runner-allow-user-friendly-job-events-json-file-names/4060>\
**Category:** Get Help\
**Tags:** ansible-runner\
**Created:** [February 26, 2024, 1:57pm UTC](https://forum.ansible.com/t/does-ansible-runner-allow-user-friendly-job-events-json-file-names/4060 "2024-02-26T13:57:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ShanDesai](https://avatars.discourse-cdn.com/v4/letter/s/838e76/32.png) [@ShanDesai](https://forum.ansible.com/u/ShanDesai)\
**Post date:** [February 26, 2024, 1:57pm UTC](https://forum.ansible.com/t/does-ansible-runner-allow-user-friendly-job-events-json-file-names/4060/1 "2024-02-26T13:57:22Z")

</div>

I am creating a Simple REST API based on the [https://github/com/ansible/ansible-runner-service](https://github/com/ansible/ansible-runner-service) that suits my needs as opposed to AWX for the moment. As I am experimenting with `ansible-runner` CLI at the moment, I generate artifacts for my playbooks by explicitly mentioning:

- `artifact-dir`
- `-i` to not use UUID

A typical CLI execution looks like the following:

```bash
ansible-runner run . \
  --artifact-dir=artifacts/stack/ \
  -i teardown \
  --project-dir=project \
  -p stack_teardown.yml

```

I wish to create the artifacts based on the name of the playbook e.g. `stack_generate.yml` Playbook will have artifacts in `artifacts/stack/generate` and `stack_teardown.yml` will have artifacts in `artifacts/stack/teardown` directory respectively.

This is achievable via the `-i` flag and works really well.

However, the `job_events` generated under the respective artifacts directory are still UUID based. I was wondering if there would be some API in the Runner where the `job_events` can also have user-friendly names?

---

<div class="post-metadata">

**Author:** ![kurokobo](https://sea1.discourse-cdn.com/ansible/user_avatar/forum.ansible.com/kurokobo/32/182_2.png) [@kurokobo](https://forum.ansible.com/u/kurokobo)\
**Post date:** [February 26, 2024, 2:19pm UTC](https://forum.ansible.com/t/does-ansible-runner-allow-user-friendly-job-events-json-file-names/4060/2 "2024-02-26T14:19:34Z")

</div>

Hi, the name for the JSON files under `job_events` is generated based on `counter` and `uuid` in the JSON data itself. AFAIK there seems to be no room to modify this filename.

This is the code block for generating the name.

> <https://github.com/ansible/ansible-runner/blob/aa9bbe0e84db1ab2853422a447cdac78d6fb4606/src/ansible_runner/streaming.py#L306-L317>

You might consider creating a small script that renames the JSON files after running ansible-runner.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/ansible/original/1X/1882d9a01da5d8996a862359b0913cc568a39b84.svg) [@system](https://forum.ansible.com/u/system)\
**Post date:** [March 27, 2024, 2:20pm UTC](https://forum.ansible.com/t/does-ansible-runner-allow-user-friendly-job-events-json-file-names/4060/3 "2024-03-27T14:20:03Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
