ansibleforms icon indicating copy to clipboard operation
ansibleforms copied to clipboard

Return `extravars` & `credentials` as a JSON object not a JSON string

Open dsha256 opened this issue 1 year ago • 5 comments

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"
}

dsha256 avatar May 02 '24 15:05 dsha256

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.

ansibleguy76 avatar May 02 '24 16:05 ansibleguy76

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

dsha256 avatar May 03 '24 10:05 dsha256

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

ansibleguy76 avatar May 03 '24 12:05 ansibleguy76

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 avatar May 04 '24 17:05 ansibleguy76

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 avatar May 04 '24 18:05 ansibleguy76

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

ansibleguy76 avatar May 17 '24 13:05 ansibleguy76