ManageIQ / manageiq

ManageIQ Open-Source Management Platform
https://manageiq.org
Apache License 2.0
1.34k stars 900 forks source link

Vars passed to AWX as arrays are converted to strings by launch_ansible_job #21028

Open mikebutak opened 3 years ago

mikebutak commented 3 years ago

In the post-provisioning state I'm calling an AWX template. I'm passing 9 variables to the playbook (with prompt on launch active). The playbook is successfully called, and all of the vars come through. However two of the vars are supposed to be arrays. Instead they come through to AWX as strings: e.g., '["chefclient"]' instead of ["chefclient"].

I have confirmed that these vars are indeed of type array in the post-provisioning method before I pass them to the launch_ansible_job method. Per Peter McGowan this is a limitation of launch_ansible_job. Per Jason Frey a fix of this has been previously explored.

debemdeboas commented 1 year ago

hey, any updates on this?

miq-bot commented 1 year ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

miq-bot commented 1 year ago

This issue has been automatically closed because it has not been updated for at least 3 months.

Feel free to reopen this issue if this issue is still valid.

Thank you for all your contributions! More information about the ManageIQ triage process can be found in the triage process documentation.

noor47-pixel commented 10 months ago

hey, any updates on this?

Fryguy commented 10 months ago

@agrare I'm not sure why I self-assigned this, but can you take a look at it?

Fryguy commented 10 months ago

I'm not sure where the limitation lies. I think I misunderstood the original issue and thought it was the automate-array fix that we put in some time ago, but this sounds different and might be down in Ansible::Runner

miq-bot commented 7 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

miq-bot commented 3 months ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

miq-bot commented 2 weeks ago

This issue has been automatically marked as stale because it has not been updated for at least 3 months.

If you can still reproduce this issue on the current release or on master, please reply with all of the information you have about it in order to keep the issue open.

Fryguy commented 2 weeks ago

@GilbertCherrie Do you think that https://github.com/ManageIQ/manageiq-automation_engine/pull/545 fixes this?

GilbertCherrie commented 2 weeks ago

@GilbertCherrie Do you think that ManageIQ/manageiq-automation_engine#545 fixes this?

That pr only fixes this issue for multi select arrays. In the image below the result of the multiselect (test1) is an array but the normal select (test2) is still returned as a string. This issue doesn't specify but I'm assuming since we want array values this is using a multiselect component, in which case this pr should fix this issue. If this issue is referring to single select drop downs then this pr won't fix this issue but I'm not sure if we would want to convert a single select dropdown to an array anyways.

image