dell / dellemc-openmanage-ansible-modules

Dell OpenManage Ansible Modules
GNU General Public License v3.0
336 stars 163 forks source link

ome_firmware_catalog in 3.4.0 not idempotent with CIFS password present #280

Closed MallocArray closed 3 years ago

MallocArray commented 3 years ago

In the 3.4.0 collection, the ome_firmware_catalog module became more idempotent, but if configuring a CIFS repository with the repository_password field, the task always returns "changed" instead of "ok" even if no changes to the configuration are being made.

I assume this is because the password cannot be checked if it is the same, or at least is not being checked, so the module is always pushing the change for the password field, resulting in the task reporting a change.

At a minimum, this should be called out in the documentation for the repository_password parameter so it can be expected, or better yet, a method to detect if the password field is changing so it can accurately report any modifications.

I spent a good 15 minutes comparing my current values to the ones in the playbook to determine what was different while in check mode.

jagadeeshnv commented 3 years ago

@MallocArray Its covered in the notes section of the module. https://github.com/dell/dellemc-openmanage-ansible-modules/blob/32abc4cea3cb102fab051408f327403bc9ae0683/plugins/modules/ome_firmware_catalog.py#L121

MallocArray commented 3 years ago

Ah, so it is. Can I suggest also adding a note to the repository_password parameter in addition to the Notes section?

jagadeeshnv commented 3 years ago

I think that would be good. Will discuss with my team and get back.

jagadeeshnv commented 3 years ago

https://github.com/dell/dellemc-openmanage-ansible-modules/blob/f161c6789bdd3c1d81d6b442af65db56a9de7930/plugins/modules/ome_firmware_catalog.py#L122 The required note has been added