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

add a note about DEFAULT_JINJA2_NATIVE and remove json notation from the examples #113

Open
bastolino opened this issue Apr 11, 2024 · 2 comments

Comments

@bastolino
Copy link

Hi everyone,

you have the json_body inserted as json everywhere. It is possible to continue with yaml notation right away but if you insert logik with jinja2, it gets automatically converted into strings. Possibly, this is the reason why you switched to json.
If sou set DEFAULT_JINJA2_NATIVE (https://docs.ansible.com/ansible/latest/reference_appendices/config.html#default-jinja2-native) to true, you can use yaml inside the playbook for the api_body as it is intended.

So, just a small change with huge impact regarding usability for this module.

Best regards

@dsoper2
Copy link
Collaborator

dsoper2 commented Apr 11, 2024

Thanks for the links. JSON is currently used to allow direct copy/paste from Intersight's API browser and UI code generation .

@dsoper2
Copy link
Collaborator

dsoper2 commented Apr 11, 2024

Here's some additional info on setting jinja2 to true from an earlier issue: #107

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