freeipa / ansible-freeipa

Ansible roles and modules for FreeIPA
GNU General Public License v3.0
482 stars 230 forks source link

ipauser: Add support for renaming users #1174

Closed rjeffman closed 7 months ago

rjeffman commented 8 months ago

FreeIPA suports renaming user objects with the CLI parameter "rename", and this parameter was missing in ansible-freeipa ipauser module.

This patch adds support for a new state 'renamed' and the 'rename' parameter.

Tests were updated to cope with the changes.

Related to RHBZ#2234379, RHBZ#2234380

Fixes #1103

t-woerner commented 7 months ago

According to the DOCUMENTATION section rename is only supported as part of users. This needs to be fixed.

t-woerner commented 7 months ago

Is it needed to ensure that there will not be a name conflict? Several renames to the same name or a rename to an already existing name?

rjeffman commented 7 months ago

@t-woerner I fixed the documentation.

I did not add any means to check if the resulting state after renaming all requested users is valid, as this should include a general method to doing so, that could be used by all modules that has the renamed state. This should be handled in another PR.