Thanks!

but I dont see any output running it


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


PLAY [get info vm]
******************************************************************************************************************************************************************

TASK [get info about the virtual machine]
*******************************************************************************************************************************************
ok: [localhost -> localhost] => (item=dr-reb)
ok: [localhost -> localhost] => (item=dr-wac)

TASK [debug]
************************************************************************************************************************************************************************
ok: [localhost] => {
    "msg": [
        "dr-reb",
        "dr-wac"
    ]
}

PLAY RECAP
**************************************************************************************************************************************************************************
localhost                  : ok=2    changed=0    unreachable=0    failed=0
   skipped=0    rescued=0    ignored=0

On Sun, May 24, 2020 at 4:08 PM James Cassell <[email protected]>
wrote:

>
> On Sun, May 24, 2020, at 6:56 PM, Tony Wong wrote:
> > ---
> > - 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
> >
>
> Delete 2 spaces from the tasks line.
>
> V/r,
> James Cassell
>
> --
> 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/e3016f38-6094-4de7-9c52-ececd1b3ac05%40www.fastmail.com
> .
>

-- 
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/CALmkhkrYKULujhDcjs7ZzRcL1mjgw2d_zqHHMpvqfw36NA6oxw%40mail.gmail.com.

Reply via email to