Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmware_vm_inventory - fixed hostgroups being created automatically when the with_path option is enabled #2248

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

dmnagornyi
Copy link

@dmnagornyi dmnagornyi commented Nov 14, 2024

SUMMARY

Fixes #1688
Plugin should not create hostgroups automatically when with_path is true. There is keyed_groups parameter for that.

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

community.vmware.vmware_vm_inventory

ADDITIONAL INFORMATION
I just removed a block of code that performed an undocumented function and generated a lot of unnecessary hostgroups.

Removed the piece that automatically created the host groups from the VM path.
Removed unnecessary ansible.module_utils.six module.
It makes sense to look for rooted 'path' value in variable instead of group_names
Updated Inventory with rooted 'with_path' option test.
@dmnagornyi
Copy link
Author

@mariolenz please take a look when you have a chance. Minimal changes, shouldn't interfere with anything.

@mariolenz
Copy link
Collaborator

recheck

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

community.vmware.vmware_vm_inventory creates groups for each folder in the hosts path
2 participants