I created a yml file like this. I just need to test it on one vm. 

---
- hosts all
  gather_facts: false
  connection: local
  user: remote

  vars:
    vcenter_hostname: 'vcenter.domain.com'
    username: '[email protected]'
    password: 'xxxxxxxx'
    datacenter_name: 'DC1'
    VM_Name: 'vm1'

    - name: Running VMTools Playbook
      hosts: localhost
      gather_facts: false
      connection: local
      tasks:
      - name: Get Virtual Machine info
        vmware_guest_info:
          validate_certs: no
          hostname: "{{ vcenter_hostname }}"
          username: "{{ user }}"
          password:  "{{ pass }}"
          validate_certs: no
          datacenter: "{{ datacenter_name }}"
          name: "{{ VM_Name }}"
          schema: "vsphere"
          properties:
        delegate_to: localhost
        register: vminfo

      - name: Updating VM Tools
        vmware_guest_tools_upgrade:
          validate_certs: no
          hostname: "{{ vcenter_hostname }}"
          username: "{{ user }}"
          password: "{{ pass }}"
          datacenter: "{{ datacenter_name }}"
          uuid: "{{ vminfo.instance.config.uuid }}"
        delegate_to: localhost



what else do i need?

On Sunday, April 12, 2020 at 10:16:23 AM UTC-7, Tony Wong wrote:
>
> does anyone have a playbook or how do i get started with a playbook 
> updating vmwasr tools on windows guests?
>

-- 
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/21c2042d-6100-44e6-8343-c7d204dfc23d%40googlegroups.com.

Reply via email to