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

Parameter type normalization #1663

Draft
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Aug 28, 2023

in #1659 we realized that even tho the user might pass '["something"]' as a string to Ansible, our code will receive ["something"] as an array later, which might have weird consequences when passing the data to Foreman.

This is an attempt to fix it.

We define the `value` attribute as `raw` as it can have different data
types, which means Ansible will helpfully convert a `"['something']"`
string to an actual array with the entry `'something'`.
However, if the `parameter_type` in Foreman is `string`, we really
should send a string, not an array Ansible converted for us.
@evgeni evgeni force-pushed the parameter-type-normalization branch from 90e9ab0 to f4bea7a Compare August 28, 2023 06:20
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

Successfully merging this pull request may close these issues.

1 participant