I’ve been making my way through converting my playbooks from 2.18 to 2.19 and I’ve noticed odd (to me) behavior when supplying extra_vars via a job template in AWX between the two.
Here’s the playbook:
---
- name: Show fact
hosts: localhost
gather_facts: false
become: false
connection: local
tasks:
- name: Show fact
ansible.builtin.debug:
msg: "date_fact is {{ date_fact }}"
I supply an extra_var via AWX for date_fact of "date_fact": "2025-09-11T12:29:45.000000+00:00"
The results of the playbook run for the 2.18 execution environment are:
PLAY [Show fact] ***************************************************************
TASK [Show fact] ***************************************************************
ok: [localhost] => {
"msg": "date_fact is 2025-09-11T12:29:45.000000+00:00"
}
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
For the 2.19 execution environment it is:
PLAY [Show fact] ***************************************************************
TASK [Show fact] ***************************************************************
ok: [localhost] => {
"msg": "date_fact is 2025-09-11 12:29:45+00:00"
}
PLAY RECAP *********************************************************************
localhost : ok=1 changed=0 unreachable=0 failed=0 skipped=0 rescued=0 ignored=0
I can’t seem to replicate this behavior running ansible-playbook using 2.19 locally, it seems to only happen in the AWX template with the 2.19 EE.
So, in short, 2025-09-11T12:29:45.000000+00:00
shows as 2025-09-11T12:29:45.000000+00:00
for Ansible 2.18 EE via an AWX template extra_var. However, 2025-09-11T12:29:45.000000+00:00
turns to 2025-09-11 12:29:45+00:00
for Ansible 2.19 EE via an AWX template extra_var.
My use-case is that I have other jobs that trigger this job and they send a datetime stamp as an extra_var for it to send to an external API endpoint so the source jobs don’t need to wait/care about this reporting process.
I was able to get it to work with a strftime conversion in my original job, but I’m curious at the root cause of this as it may affect other playbooks in different ways. I didn’t see anything in Ansible-core 2.19 Porting Guide — Ansible Community Documentation pardon me if I missed it.