nutanix / nutanix.ansible

Official Nutanix Ansible collections
GNU General Public License v3.0
61 stars 34 forks source link

[Bug] Fix errors when TRANSFORM_INVALID_GROUP_CHARS is always #464

Open bootswithdefer opened 5 months ago

bootswithdefer commented 5 months ago

Cluster names can contain invalid characters (according to Ansible standards for group names) and when the Ansible setting TRANSFORM_INVALID_GROUP_CHARS is set to "always" the inventory script will throw exceptions and fail. The add_group method will return the sanitized name, so this will fix the error. It should cause no change in behavior when TRANSFORM_INVALID_GROUP_CHARS is set to the default of "never".

https://docs.ansible.com/ansible/latest/reference_appendices/config.html#transform-invalid-group-chars