Theoretically in Jinja 2.8 when it's released you could perform this operation
with something like this:
{{
fusemq_auth|selectattr('username','equalto','LOGSTASH')|map(attribute='password')|first
}}
selectattr and map are new to version 2.7. The 'equalto' test is the problem
you'll run in to.
So the map function with an optional selectattr provides the dict_to_list
function you are looking for. (Your gist wouldn't load.) I don't see how a
general purpose list_to_dict would be possible without some specific logic be
written.
<tim/>
--
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/a26ab6ed-8f6c-4a2f-a3e5-c4d436503af2%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.