community.vmware.vmware_guest_vnc – Manages VNC remote display on virtual machines in vCenter¶
Note
This plugin is part of the community.vmware collection (version 1.9.0).
To install it use: ansible-galaxy collection install community.vmware
.
To use it in a playbook, specify: community.vmware.vmware_guest_vnc
.
Requirements¶
The below requirements are needed on the host that executes this module.
python >= 2.6
PyVmomi
Parameters¶
Examples¶
- name: Enable VNC remote display on the VM
community.vmware.vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
folder: /mydatacenter/vm
name: testvm1
vnc_port: 5990
vnc_password: vNc5ecr3t
datacenter: "{{ datacenter_name }}"
state: present
delegate_to: localhost
register: vnc_result
- name: Disable VNC remote display on the VM
community.vmware.vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
uuid: 32074771-7d6b-699a-66a8-2d9cf8236fff
state: absent
delegate_to: localhost
register: vnc_result
- name: Disable VNC remote display on the VM using MoID
community.vmware.vmware_guest_vnc:
hostname: "{{ vcenter_hostname }}"
username: "{{ vcenter_username }}"
password: "{{ vcenter_password }}"
datacenter: "{{ datacenter_name }}"
moid: vm-42
state: absent
delegate_to: localhost
register: vnc_result
Return Values¶
Common return values are documented here, the following are the fields unique to this module:
Authors¶
Armin Ranjbar Daemi (@rmin)