AnsiblePilot — Master Ansible Automation

AnsiblePilot is the leading resource for learning Ansible automation, DevOps, and infrastructure as code. Browse over 1,100 tutorials covering Ansible modules, playbooks, roles, collections, and real-world examples. Whether you are a beginner or an experienced engineer, our step-by-step guides help you automate Linux, Windows, cloud, containers, and network infrastructure.

Popular Topics

About Luca Berton

Luca Berton is an Ansible automation expert, author of "Ansible for VMware by Examples" and "Ansible for Kubernetes by Example" published by Apress, and creator of the Ansible Pilot YouTube channel. He shares practical automation knowledge through tutorials, books, and video courses to help IT professionals and DevOps engineers master infrastructure automation.

Get VMware vSphere Virtual Machine UUID - Ansible module vmware_guest_info

By Luca Berton · Published 2024-01-01 · Category: troubleshooting

How to automate the gathering of UUID of a specific “myvm” VMware vSphere Virtual Machine using Ansible Playbook and vmware_guest_info module.

How to Get VMware vSphere Virtual Machine UUID with Ansible? I'm going to show you a live Playbook and some simple Ansible code. I'm Luca Berton and welcome to today's episode of Ansible Pilot.

Ansible Get VMware vSphere Virtual Machine UUID • community.vmware.vmware_guest_info • Gather info about a single VM

Let's talk about the Ansible module vmware_guest_info. The full name is community.vmware.vmware_guest_info, which means that is part of the collection of modules to interact with VMware, community-supported. The module's purpose is to gather info about a single VM.

Parameters • hostname string / port integer / username string / password string / datacenter string / validate_certs boolean - connection details • name string - Virtual machine name

The following parameters are useful in order to Get VMware vSphere Virtual Machine UUID using the module vmware_guest_info. First of all, we need to establish the connection with VMware vSphere or VMware vCenter using a plethora of self-explicative parameters: hostname, port, username, password, datacenter, and validate_certs. Once the connection is successfully established you could specify the virtual machine name to obtain all information about it.

Linkscommunity.vmware.vmware_guest_info

Playbook How to Get VMware vSphere Virtual Machine UUID with Ansible. I'm going to show you how to Gather Information about a specific "myvm" VMware Virtual Machine and select the UUID using Ansible Playbook.

code • vm_uuid.yml • vars.yml

execution

idempotency

after execution

!vmware_guest_info after execution

code with ❤️ in GitHub

Conclusion Now you know how to Get VMware vSphere Virtual Machine UUID with Ansible.

Related ArticlesAnsible Become Guide

Category: troubleshooting

Watch the video: Get VMware vSphere Virtual Machine UUID - Ansible module vmware_guest_info — Video Tutorial

Browse all Ansible tutorials · AnsiblePilot Home