freeipa / ansible-freeipa

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

Rename conflict check #1194

Open t-woerner opened 7 months ago

t-woerner commented 7 months ago

There should be a conflict check for state: renamed, especially for modules that support to apply multi item changes like for example ipauser and ipagroup.

The check should ensure that a multi item change with a name conflict is failing as a complete transaction before a single change is applied. For each rename, there needs to be a check that there is no existing item with the same name and also that there is no name conflict (name and rename) within the transaction. Additional complexity due to sorting of the items to fix name conflicts within the transaction is not the goal.

Related: https://github.com/freeipa/ansible-freeipa/issues/1174#issuecomment-1863267473