Open Amrish-Sharma opened 1 year ago
Hello, we were unable to duplicate this issue in the current version of AWX. Please try upgrading to the latest version and let us know if that resolves your issue.
example of what I tested (on latest AWX)
@Amrish-Sharma do you have a more specific example to test?
If there is a syntax error in the JSON field, it won't be able to convert to YAML. Can you confirm the JSON is valid? And are there any errors in the console?
If the toggle is switching to the YAML button when the JSON has a syntax error, this behavior is a bug. Are you able to share the exact JSON value you have?
Hey @keithjgrant
Please find below the json content, there are no issues in json syntax
{
"keyed_groups": [
{
"prefix": "arch",
"key": "architecture"
},
{
"prefix": "tag",
"key": "tags"
},
{
"prefix": "instance_type",
"key": "instance_type"
},
{
"prefix": "aws_region",
"key": "placement.region"
},
{
"prefix": "aws_az",
"key": "placement.availability_zone"
},
{
"prefix": "key",
"key": "key_name"
}
],
"hostnames": [
"tag:Name"
],
"compose": {
"ec2_tag_cluster_hosts": "tags.cluster_hosts.split(\",\")",
"ansible_host": "private_ip_address"
},
"filters": {
"instance-state-name": "running",
"tag-key": "Role"
}
}
I copy and pasted your json, and it appears to flip to yaml just fine in the UI
Please confirm the following
security@ansible.com
instead.)Bug Summary
Hello Friends,
When I am trying to edit the EC2 Source(Dynamic Inventory) in yaml mode, It doesn't switch from json. It remains in JSON format
JSON format enabled:
with YAML format enabled
Thanks for your time and efforts to keep this project alive!
Do let me know in case any further information is required from my end
AWX version
21.1
Select the relevant components
Installation method
kubernetes
Modifications
no
Ansible version
No response
Operating system
No response
Web browser
Chrome
Steps to reproduce
Expected results
Actual results
Additional information
No response