freeipa / ansible-freeipa

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

ipahbacrule: Fix handling of hbacsvcgroup in members #1203

Closed rjeffman closed 5 months ago

rjeffman commented 6 months ago

FreeIPA provides a default hbacsvcgroup named "Sudo", with capital 'S', that is different from every other hbacsvcgroup, which are all represented by lower case letters.

As data from IPA API was not modified, this causes an idempotence error when using different capitalization with the 'hbacsvcgroup' parameter.

This patch fixes the issue by using the CaseInsensitive comparator to create the hbacsvcgroup list.

Tests were update to make sure a regression is not included in the future.

Fixes #834