ansible-module-vcloud-director icon indicating copy to clipboard operation
ansible-module-vcloud-director copied to clipboard

Support VMware Cloud Director for vmware_vm_inventory

Open Akasurde opened this issue 4 years ago • 6 comments

From @patsevanton on Dec 21, 2020 05:54

SUMMARY

Support VMware Cloud Director for vmware_vm_inventory

ISSUE TYPE
  • Feature Idea

Hello! Thanks for community.vmware.

ansible --version

ansible 2.9.16
  config file = /home/user/sdp-cloud-control/devops/customization/ansible.cfg
  configured module search path = ['/home/user/.ansible/plugins/modules', '/usr/share/ansible/plugins/modules']
  ansible python module location = /home/user/.local/lib/python3.6/site-packages/ansible
  executable location = /home/user/.local/bin/ansible
  python version = 3.6.9 (default, Oct  8 2020, 12:12:24) [GCC 8.4.0]

Vmware

VMware Cloud Director version: 10.2.0.17008054 Thu Oct 08 23:53:08 MSK 2020

I try get inventory for ansible from VMware Cloud Director

ansible-inventory --list -i vmware.yaml

Error:

[WARNING]:  * Failed to parse /home/user/sdp-cloud-control/devops/customization/vmware.yaml with vmware_vm_inventory plugin: Unknown error while connecting to vCenter or ESXi API at xxxxx:443 :
xxxxxxx:443 is not a VIM server
[WARNING]: Unable to parse /home/user/sdp-cloud-control/devops/customization/vmware.yaml as an inventory source
[WARNING]: No inventory was parsed, only implicit localhost is available
{
    "_meta": {
        "hostvars": {}
    },
    "all": {
        "children": [
            "ungrouped"
        ]
    }
}

Copied from original issue: ansible/ansible#585

Akasurde avatar Dec 22 '20 05:12 Akasurde

From @Akasurde on Dec 22, 2020 05:21

@patsevanton Thanks for the feature idea. vCloud Director is managed by https://github.com/vmware/ansible-module-vcloud-director repo. I think this is the correct location for this feature.

Akasurde avatar Dec 22 '20 05:12 Akasurde

Migrated issue.

Akasurde avatar Dec 22 '20 05:12 Akasurde

@Akasurde, Could you please elaborate more on the inventory for example, what kind of information you are looking for as inventory here?

mukultaneja avatar Jan 18 '21 19:01 mukultaneja

Hello! I try get name and ip virtual machine from vmware vcloud for use in ansible inventory.

patsevanton avatar Jan 20 '21 16:01 patsevanton

Hello @patsevanton, I am sorry for the delayed response. I was looking into the query and would like to check if the existing functionality would work for you. This functionality already gives us the list of VMs and IPs created inside a vApp. We also have a sample play that would return all the VMs and IPs present in a vApp. Please take a look at it once and let me know if it works for you.

mukultaneja avatar Mar 02 '21 12:03 mukultaneja

Hello @mukultaneja. I dont use ansible-module-vcloud-director. I use terraform + ansible. My first issue was https://github.com/ansible-collections/community.vmware/issues/585#event-4138623635

patsevanton avatar Mar 03 '21 06:03 patsevanton