no vmware module to gather vm facts with datastore and cluster information

17 views
Skip to first unread message

Oğuz Yarımtepe

unread,
Oct 30, 2017, 2:26:25 PM10/30/17
to Ansible Project
Hi,

I am trying get VM facts from my VMware 6.5 environment and trying vmware_guest_facts. Below is my tasks/main.yml

---
- name: Gather facts from standalone ESXi server having datacenter
  vmware_guest_facts:
    hostname: osvvca02.foo.net
    username: some_user_name_here
    password: password_here
    datacenter: OFFICE
    folder: OFFICE/vm/SISTEM
    validate_certs: no
    name: OSLTST02
  register: facts
  delegate_to: localhost

- name: debug message
  debug:
    msg: "{{ facts }}"

I didn't see datastore, cluster and folder information in the fact output. I check the vmware_guest.py and it seems no such information is added: https://github.com/ansible/ansible/blob/d8b1cb9a634d0e828a7be39d4019a6215410e643/lib/ansible/modules/cloud/vmware/vsphere_guest.py#L1572

Is there any module that adds datastore and cluster information or should i change the current module?

I am planning to gather a vm fact and use that facts to clone a similar vm with different configuration. Any suggestion also welcomed.

Reply all
Reply to author
Forward
0 new messages