Closed arozmarin closed 8 months ago
This seems to have something to do with the way Ansible/Jinja2 handle string and lists.
The issue is that your filter
is being treated as a list of filters, thus the IPA API error reporting.
I was able to fix this with the following change to filter
:
- name: Ensure permission perm-test-1 is present
ipapermission:
name: perm-test-1
object_type: host
memberof: rbacgroup1
filter:
- '(!(memberOf=cn=admins,cn=groups,cn=accounts,dc=example,dc=com))'
right: all
Note that my filter is now a list entry, so (somehow) it is not considered a list of filters anymore (maybe because Ansible expect a list of strings, but I have digged deeper).
Perfect thanks for help. It's working now
Hi guys, I could't make it work. I try to use Permission module and
that is my task
and task always fails
I tried different variables for filter eve remove variable and write value like
filter: '(!(memberOf=cn=admins,cn=groups,cn=accounts,dc=example,dc=com))' filter: "(!(memberOf=cn=admins,cn=groups,cn=accounts,dc=example,dc=com))"
I get always same error. Any idea how should I write filter value that module will work. If I don't include filter in task, task works ok.
thanks