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

Not able to add a vcenterserver object #212

Open
ngrosc opened this issue Jan 29, 2025 · 0 comments
Open

Not able to add a vcenterserver object #212

ngrosc opened this issue Jan 29, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@ngrosc
Copy link

ngrosc commented Jan 29, 2025

Describe the bug

Using vmware.alb.avi_vcenterserver (version 22.1.7 or 30.2.2) to create a vcenterserver for addint to a nsx-t cloud failes in a "list index out of range" error.

Reproduction steps

  1. define the vars for a nsx-t cloud and for a vcenterserver
- name: Create vcenter
  vmware.alb.avi_vcenterserver:
    avi_credentials: "{{ avi_credentials }}"
    name: vcentera
    vcenter_url: vcenter.local.domain
    vcenter_credentials_ref: MYCRED
    content_lib: 
      id: <uuid>
    cloud_ref: NAMEOFNSXTCLOUD
  1. deploy it
  2. it failes with list index out of range error

Expected behavior

vcenter gets created and linked to cloud

Additional context

Issue seems to be in file vmware/alb/plugins/module_utils/utils/ansible_utils.py, line 485 (30.2.2) or line 479 (22.1.7). Changing

#cloud = obj['cloud_ref'].split('name=')[1]

to

cloud = obj['cloud_ref']

fixes it in a quick and dirty way as we now have to use the uuid instead of the name.

@ngrosc ngrosc added the bug Something isn't working label Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant