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.
