Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return extravars & credentials as a JSON object not a JSON string #171

Closed
dsha256 opened this issue May 2, 2024 · 6 comments
Closed

Return extravars & credentials as a JSON object not a JSON string #171

dsha256 opened this issue May 2, 2024 · 6 comments

Comments

@dsha256
Copy link

dsha256 commented May 2, 2024

Currently extravars & credentials are returned as a JSON string. Returning them as JSON objects would be great.

Currently:

"extravars": "{\"name\":\"vm1\",\"region\":\"myregion\",\"opco\":\"myopco\"}"

After:

{
  "name": "vm1",
  "opco": "myopco",
  "region": "myregion"
}
@ansibleguy76
Copy link
Owner

Hi, I'm not entirely sure what you mean. The goals of AF is to send extravars to either AWX or local ansible. They are sent in the correct format. It's the receiving end that needs to parse the json. But maybe I understand your question wrong.

@dsha256
Copy link
Author

dsha256 commented May 3, 2024

I mean the the formats of the values (extravars & credentials) in the response body given in the screenshot. IDK, maybe that was meant to be shown like it is now for some reason.
image

@ansibleguy76
Copy link
Owner

aha.. I understand. I could indeed make that an object. I just hope that won't break for others then. Same for credentials then.

@dsha256 dsha256 changed the title Return extravars & credentials as a JSON object not a string Return extravars & credentials as a JSON object not a JSON string May 4, 2024
@ansibleguy76
Copy link
Owner

will be fixed in 5.0.2 (beta coming today). changed together with credentials, approvals, substeps, notifications. All now converted in objects in the api call. The client code is changed too where it is now no longer parsed.

@ansibleguy76
Copy link
Owner

new beta is now being pushed. use image ":beta" instead of ":latest". And use ctrl-F5 to clear the browser cache.
let me know the outcome

@ansibleguy76
Copy link
Owner

I will close this... ping me if you think it should not be closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants