---
- name: get info vm
  hosts: localhost
  connection: local
  gather_facts: false
  vars:
    vm_list:
    - dr-reb
    - dr-wac
    tasks:
    - name: get info about the virtual machine
      vmware_guest_info:
        hostname: vcenter
        username: [email protected]
        password: Password123@
        datacenter: RW-VA
        validate_certs: False
        name: "{{ item }}"
        schema: "vsphere"
        properties: ["config.hardware.memoryMB", "config.hardware.numCPU", 
"guest.disk", "overallStatus"]
      delegate_to: localhost
      register: vm_info
      with_items: "{{ vm_list }}"
    - debug:
        msg: "{{ vm_list }}"


tony@ubuntu:~/ansiblework$
tony@ubuntu:~/ansiblework$
tony@ubuntu:~/ansiblework$
tony@ubuntu:~/ansiblework$
tony@ubuntu:~/ansiblework$ ansible-playbook vmware_tools.yml





why is it when i run this pb

I get nothing but this

[WARNING]: provided hosts list is empty, only localhost is available. Note 
that the implicit localhost does not match 'all'

[WARNING]: Found variable using reserved name: tasks

-- 
You received this message because you are subscribed to the Google Groups 
"Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/d1b7fff7-e8d3-4359-88b2-36e9052375e7%40googlegroups.com.

Reply via email to