ansible-for-i icon indicating copy to clipboard operation
ansible-for-i copied to clipboard

ibmi_user_and_group idempentence

Open StephaneV44 opened this issue 2 years ago • 2 comments

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}

StephaneV44 avatar Feb 07 '23 15:02 StephaneV44

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.

changlexc avatar Feb 08 '23 08:02 changlexc

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.

StephaneV44 avatar Feb 09 '23 07:02 StephaneV44