I have the following template:
---
- name: Test MAC address validity
hosts: localhost
gather_facts: False
tasks:
- name: Debug info
debug:
var: macadres
I created a job in AWX that calls this playbook, and have turned on ‘Prompt on launch’ for variables.
Case 1:
I edit the AWX job template and add macadres: '11:33:22:55:44:11' in the variables, run the playbook, click next on the ‘Variables’ prompt, and launch.
Result:
ok: [localhost] => {
"macadres": "11:33:22:55:44:11"
}
Case 2:
I edit the AWX job template and clean the Variables section. I run the template, fill in macadres: '11:33:22:55:44:11 in the Variables prompt, click next, and launch.
Result:
ok: [localhost] => {
"macadres": 8986232651
}
So when running as regular variable, everything works fine, when running as extra variable the string is converted to an int.
Ansible: 2.19.7
AWX: 24.6.1
I also did the same tests with Ansible 2.18.14 and here everything works fine.
I’m not sure if this is a bug, or expected behaviour. If it’s a bug I’ll submit an issue on Github.