On Friday, February 23, 2018 at 5:06:39 PM UTC+5:30, Kai Stian Olstad wrote:
>
> On 23.02.2018 12:22, Foss Geek wrote:
> > # cat /tmp/test.json | jq
> > {
> > "VMware.Hardware.Version": " vmx-10",
> >
> > "toolname": "tomcat"
> >
> > }
> >
> >
> > Playbook:
> >
> >
> > # cat test.yml
> >
> > ---
> >
> > host: myhost
> >
> > vars:
> >
> > hdversion: "{{ VMware.Hardware.Version }}" # not works due to
> > dot(.), getting VARIABLE NOT DEFINED when try to reference hdversion
> > inside role
> >
> > mytoolname: "{{toolname}}" # works fine
> >
> >
> > any workaround to use hdversion: "{{ VMware.Hardware.Version }}" to
> > get the value?
> >
> > Any advise or guidance would be greatly appreciated.
>
> This should work
> {{ vars['VMware.Hardware.Version'] }}
>
>
> --
> Kai Stian Olstad
>
Oh. That helps. Thank you very much.
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/ansible-project/a03f39fb-dbcb-4145-8700-c60cd237ff73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.