On 23.02.2018 12:22, Foss Geek wrote:
# cat /tmp/test.json | jq
  "VMware.Hardware.Version": " vmx-10",

  "toolname": "tomcat"



# cat test.yml


host: myhost


  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

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 ansible-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
For more options, visit https://groups.google.com/d/optout.

Reply via email to