-
Notifications
You must be signed in to change notification settings - Fork 35
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
api_call: can't set body.content_object value to null #181
Comments
I can see, where this comes from. Ansible eats the |
Maybe if we allowed to whole body to be passed as a json string. It doesn't sound like "ansible philosophy", but well... |
This helps providing actual 'null' values in the body. Fixes pulp#181
Can you try again with the attached PR? |
I integrated your changes and changed my task to: - name: Set user role
pulp.squeezer.api_call:
operation_id: users_roles_create
parameters:
auth_user_href: "{{ auth_user_href }}"
json_body: |
{"role": "rpm.viewer", "content_object": null} and get now the following error:
|
This helps providing actual 'null' values in the body. Fixes pulp#181
I think I have fixed that now... |
Regarding to https://pulpproject.org/pulpcore/restapi/#tag/Users:-Roles/operation/users_roles_create, if you want to create a user role which applies to all objects, you should set the content_object value to
null
.Actually this does not work with the api_call module.
Example:
This example results in the following error:
I also tried different values for content_object, which all not work:
'null'
"null"
"{{ None | to_json }}"
In the pulp cli help they say that you have to set a empty string for the object parameter, which actually works there:
Versions:
pulp.squeezer: 0.0.17
pulp: 3.69.0
pulp-cli: 0.29.2
pulp-glue: 0.29.2
The text was updated successfully, but these errors were encountered: