Hi Racke,

Thanks a lot for the guidance from your side. Finally it started working.

Regards,
Jayan

On Mon, May 17, 2021 at 3:03 PM Stefan Hornburg (Racke) <[email protected]>
wrote:

> On 5/17/21 11:06 AM, [email protected] wrote:
> > 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}}
>
> debug: var: This is used for variable names.
>
> Please try
>
> debug:
>   msg: "{{Provisioned_VirtualMachines.stdout_lines }},{{
> ESXi_Version.stdout_lines}}"
>
> Regards
>        Racke
>
> >
> > ============================================
> >
> > 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] <mailto:
> [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
> > <
> https://groups.google.com/d/msgid/ansible-project/cda4fa38-d38c-483f-9468-b2a2920ea251n%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
>
>
> --
> Ecommerce and Linux consulting + Perl and web application programming.
> Debian and Sympa administration. Provisioning with Ansible.
>
> --
> 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/c24e7a40-1aa3-2e2e-ddfd-e8bf26f3854b%40linuxia.de
> .
>


-- 
Regards,

Jayan Anirudhan
Mob:09885994156

-- 
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/CAB7L2jQ635GZR%2BzcSyBdE_yUG71ARP78EFfgwX%3Dh%3DbwhS4DSkw%40mail.gmail.com.

Reply via email to