Hi Team,
I want to register multiple values and to display the details at the end. I
have created a small playbook with two register value as mentioned below,
but its display only single value instead of two. Can some body guide me
how to achieve this task.
=======================
playbook
---
- name: Gather esxi info
hosts: all
tasks:
- name: vmware version
command: esxcli system version get
register: ESXi_Version
- name: Virtual Machines
command: vim-cmd vmsvc/getallvms
register: Provisioned_VirtualMachines
- debug:
var={{Provisioned_VirtualMachines.stdout_lines,ESXi_Version.stdout_lines}}
============================================
output
TASK [Virtual Machines]
************************************************************************************************************************************************************************************
changed: [xxxxxxxxx]
TASK [debug]
***********************************************************************************************************************************************************************************************
ok: [xxxxxxxxxx] => {
"Provisioned_VirtualMachines.stdout_lines": [
"Vmid Name
File Guest OS
Version Annotation ",
"1 Win2012 [datastore1]
Win2012/Win2012.vmx windows8Server64Guest
vmx-14 ",
"12 VMware vCenter Server [datastore1] VMware vCenter
Server/VMware vCenter Server.vmx other3xLinux64Guest vmx-10 VMware
vCenter Server Appliance",
"2 RHEL7.7 [datastore1]
RHEL7.7/RHEL7.7.vmx rhel7_64Guest
vmx-14 ",
"5 Win2019 [datastore1]
Win2019/Win2019.vmx windows9Server64Guest
vmx-14 "
]
}
PLAY RECAP
*************************************************************************************************************************************************************************************************
xxxxxxxxxxx : ok=3 changed=1 unreachable=0 failed=0
skipped=0 rescued=0 ignored=0
Regards,
Jayan
--
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/cda4fa38-d38c-483f-9468-b2a2920ea251n%40googlegroups.com.