hbacsvcgroup-add is always lower casing names. The builtin group for sudo is "Sudo" though. This requires an additional change in ansible-freeipa hbacsvcrule module to prevent "hbacsvcgroup sudo: This entry is already a member".
The builtin name is not following the lower casing of the name.
$ ipa hbacsvcgroup-show sudo Service group name: Sudo Description: Default group of Sudo related services Member HBAC service: sudo, sudo-i $ ipa hbacsvcgroup-add SuDo2 -------------------------------- Added HBAC service group "sudo2" --------------------------------
Lower cased name for hbacsvcgroup sudo.
$ rpm -q freeipa-server freeipa-client ipa-server ipa-client 389-ds-base pki-ca krb5-server freeipa-server-4.10.1-1.fc37.x86_64 freeipa-client-4.10.1-1.fc37.x86_64 package ipa-server is not installed package ipa-client is not installed 389-ds-base-2.2.6-2.fc37.x86_64 package pki-ca is not installed krb5-server-1.19.2-13.fc37.x86_64