Open hb9hnt opened 1 year ago
Sorry to have kept you for so long, but I currently don't have a valid Micetro license, so I cannot test things.
Please let me know if I should apply this and maybe to the groups part as well. If so I will add it to the repo and generate a new collection.
Hey @tonk - we're not using Ansible anymore to configure the users as we migrated the central to Windows and SSO. So I can't verify whether this is still correct.
Hey all
When you try to set roles of a user using the Ansible module, the roles are toggled because the roles that are returned from the api have a lower case
role
value in theobjType
parameter but the Ansible module generates them with an upper case value for the field:This then breaks the following member test: https://github.com/menandmice/ansible_micetro/blob/main/plugins/modules/user.py#L336
This can be fixed quick and dirty by changing the objectType to lowercase in the
user.py
IMHO it would be the better approach to only compare role names since this is the primary key and the module only compares roles at this point anyway.
Most likely the same problem exists for groups, which I didn't explicitly test, though.