community.vmware.vmware_guest_tools_upgrade – Module to upgrade VMTools¶
Note
This plugin is part of the community.vmware collection (version 1.7.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_guest_tools_upgrade
.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Notes¶
Note
In order to upgrade VMTools, please power on virtual machine before hand - either ‘manually’ or using module community.vmware.vmware_guest_powerstate.
Examples¶
- name: Get VM UUID
vmware_guest_facts:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter }}"
folder: "/{{datacenter}}/vm"
name: "{{ vm_name }}"
delegate_to: localhost
register: vm_facts
- name: Upgrade VMware Tools using uuid
community.vmware.vmware_guest_tools_upgrade:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
uuid: "{{ vm_facts.instance.hw_product_uuid }}"
delegate_to: localhost
- name: Upgrade VMware Tools using MoID
community.vmware.vmware_guest_tools_upgrade:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
moid: vm-42
delegate_to: localhost
Authors¶
Mike Klebolt (@MikeKlebolt) <michael.klebolt@centurylink.com>