'I can't get extra config attributes from a VM using ansible

I'm using vmware module for ansible 2.8 with success. I'm able to set hotadd attributes to a VM, like this:

- name: Set hotadd to "{{ vm_name }}"
  vmware_guest:
    hostname: "{{ vcenter_ip }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    validate_certs: False
    uuid: "{{ vm_facts.instance.hw_product_uuid }}"
    hardware:
      hotadd_cpu: true
      hotadd_memory: true
  delegate_to: "localhost"

However, I can't get the current status of hotadd attributes from a VM using vmware_guest_facts:

- name: Get VM "{{ vm_name }}" uuid
  vmware_guest_facts:
    hostname: "{{ vcenter_ip }}"
    username: "{{ vcenter_username }}"
    password: "{{ vcenter_password }}"
    validate_certs: False
    datacenter: "{{ datacenter_name }}"
    name: "{{ vm_name }}"
  register: vm_facts
  delegate_to: localhost

Output from previous task doesn't include extra config from VM.

Is there a proper way to get this info using ansible?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source