Something like this:

values: "{{ msg | json_query('*') }}"

On 31 October 2017 at 12:53, Abey Thomas <[email protected]> wrote:
> Hi,
>
> I have got this hash
>
> ok: [localhost] => {
>     "msg": {
>         "123": "hostname1",
>         "345": "hostname2"
>     }
> }
>
> I would like to create a new list from the above hash which contains only
> the values .
> - hostname1
> - hostname2
>
> When I use variable.keys() I get the first fields I would like all the
> second fields in a new list. Is this possible?
>
> I got the hash after using combine().
>
>
> Regards,
> Abey
>
>
> --
> 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/8c9736e8-58db-41ab-9080-984bfd653ba1%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 
Dick Visser
GÉANT

Want to join us? We're hiring: https://www.geant.org/jobs

-- 
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/CAL8fbwPO_0hWb6hJ0VknQQGdpb6%3D9fnmr4eawW3PyuhsYPTUUw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to