nutanix / nutanix.ansible

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

[Bug] Fix invalid OU check in user_groups module #481

Open stahnjones opened 1 month ago

stahnjones commented 1 month ago

Describe the bug an AD group may be in an OU one or more layers deep, however the code checks only if the group DN contains ou= to trigger it as being an OU search instead of a group search.

To Reproduce Steps to reproduce the behavior:

Stack trace

Expected behavior a group that is not in the root of the AD should be added as a group not searched for as an OU and fail

Additional context Changing the check from "ou=" in config to some other check i.e. ( config[0:3] == "ou=" ) to ensure the proper object is searched for, as only an OU has a DN that starts with ou=.

stahnjones commented 1 month ago

Pull 482