Tower inventory variables are not working as expected
ostefek99 opened this issue · 1 comments
ostefek99 commented
Latest changes in Tower inventory variables #536 are not working as expected.
How to replicate:
- create new inventory
...
inventories:
- name: "Test"
description: ""
organization: "Testing inventory"
variables: |-
---
hosts:
- name: "localhost"
description: ""
variables: |-
---
ansible_connection: local
test_var: hello
...
- run the automation
- check your host variables
Result:
Host localhost
has these variable:
{'test_var': 'hello', 'ansible_connection': 'local'}
Expected:
---
ansible_connection: local
test_var: hello
ostefek99 commented
It looks like a glitch in AWX itself.
Checking the "variables" section the format seems wrong for yaml but it's correct when changing from yaml to json and back.
- "original" yaml
{'test_var': 'hello', 'ansible_connection': 'local'}
- json
{
"test_var": "hello",
"ansible_connection": "local"
}
- back to yaml
test_var: hello
ansible_connection: local
Closing this issue as it's not an issue with the infra-ansible
.