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 dynamic inventory naming collision #55137

Open
wants to merge 1 commit into
base: devel
from

Conversation

Projects
None yet
3 participants
@agowa338
Copy link
Contributor

agowa338 commented Apr 11, 2019

SUMMARY

Possible name collision within the vmware dynamic inventory plugin.
This change vmname to a urlencoded vmpath (to make it unique).
Fixes #55135

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT NAME

lib/ansible/plugins/inventory/vmware_vm_inventory.py

ADDITIONAL INFORMATION

Currently the inventory name is the vmname concatenated with it's uuid. But neither the name nor the uuid is guaranteed to be unique (both can be set arbitrarily). The only thing that is unique, is the full folder path including the vm name. Within a single folder, it is not allowed (and not possible) to have two vms with identical name.
Also special chars are not escaped properly. VMware allows any character within vm names, folder names, ... This causes even trouble within VMwares own PowerCLI api (the powershell one)

DRAFT Status

Currently this pr is a draft, as it slows down the inventory plugin enormously.

@ansibot

This comment has been minimized.

Copy link
Contributor

ansibot commented Apr 11, 2019

@ansibot ansibot removed the needs_triage label Apr 11, 2019

@agowa338 agowa338 marked this pull request as ready for review Apr 18, 2019

@agowa338 agowa338 closed this Apr 20, 2019

@agowa338 agowa338 force-pushed the agowa338:patch-4 branch from f25a3e4 to d264bf4 Apr 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.