IBM / ansible-for-i

the tool is to provide several customized modules for Ansible to manage IBM i systems.
GNU General Public License v3.0
54 stars 52 forks source link

ibmi_user_and_group idempentence #150

Open StephaneV44 opened 1 year ago

StephaneV44 commented 1 year ago

The ibmi_user_and_group module should not be idempotent, so when I ask for a profile to be created with some parameters, I want that if it already exists, the module should modify the profile instead of returning the error: FAILED! => {"changed": false, "msg": "User profile XXXXXX already exists", "rc": 256}

changlexc commented 1 year ago

There's a operation choices: ['create', 'change', 'delete', 'display', 'display_group_members'], I think in this case, would it be 'change'. From implementation perspective, IBMi use different command to perform the CREATE and UPDATE.

StephaneV44 commented 1 year ago

Caution: Ansible-for-i modules should not be adapted to IBM i commands but should be made according to ansible principles. And idempotence is a founding principle of Ansible.