does anyone have a playbook or how do i get started with a playbook updating vmwasr tools on windows guests?
Trythe following code,
I am because the tools moulde is looking for a UUID of the Machine I'm first doing a Gather_facts on that machine inorder to get the UUID then importing that as a variable in the next task
:---
- 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
I created a yml file like this. I just need to test it on one vm.