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

Unable to lookup vm_moid or vcenter_vm_info a VM Template not in Content Library #473

Open
jeffmcutter opened this issue Feb 16, 2024 · 1 comment
Labels
blocked Used when issue is blocked by so other issue

Comments

@jeffmcutter
Copy link

SUMMARY

Unable to lookup vmware.vmware_rest.vm_moid or vmware.vmware_rest.vcenter_vm_info a VM Template not in a content library.

Related to #453 unable to clone from a VM Template not in a content library.

I'm not sure that vm_moid and vcenter_vm_info should be the way to get it, but I don't see any equivalent for templates which are not in a content library. template_moid and vcenter_template_info would be another option.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

vmware.vmware_rest.vm_moid
vmware.vmware_rest.vcenter_vm_info

ADDITIONAL INFORMATION
---
- name: Lookup test
  hosts: localhost
  gather_facts: false
  tasks:
    - name: Lookup a VM Template
      ansible.builtin.debug:
        msg: "{{ lookup('vmware.vmware_rest.vm_moid', '/Datacenter/templates/vmwrhel1_template') }}"

    - name: Get VM Template info
      vmware.vmware_rest.vcenter_vm_info:
        names:
          - vmwrhel1_template
      register: __template

    - name: Display template
      ansible.builtin.debug:
        var: __template
@machacekondra
Copy link

machacekondra commented Feb 29, 2024

Unfortunately this is currently limitation in the Vmware REST API, so not doable via this collection. Once API will support it, we will add support.

Here is workaround how to do it via communit.vmware collection.

@machacekondra machacekondra added the blocked Used when issue is blocked by so other issue label Mar 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked Used when issue is blocked by so other issue
Projects
None yet
Development

No branches or pull requests

2 participants