On Friday, 3 January 2014 00:13:33 UTC+1, Kahlil Hodgson wrote:
Hi Anand,
>
> Fun though it may be, I hope we are not getting too off-topic by
> discussing new and obscure jinja2 features on the ansible list :-)
>
I hope so too, but no-one has told us to shut up, so maybe they also want
to use about this feature.
> I currently don't have things set up to test this, so I'm just making
> guesses based on the documentation and eye-balling the code.
>
> My next thought is to see what we are passing to the last link in the
> filter chain with
>
> {{ansible_em1.ipv6 | selectattr("scope", "equalto", "link") | first |
> pprint }}
>
This gives me:
TASK: [debug msg='{{ansible_em1.ipv6 | selectattr("scope", "equalto",
"link") | first | pprint}}'] ***
ok: [ns1.ams.authdns.ripe.net] => {
"msg": "{uaddress: ufe80::baca:3aff:feee:daf3, uprefix: u64, uscope:
ulink}"
}
So it *looks* like a dictionary with an attribute called "address". But
then using attr() fails.
--
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].
For more options, visit https://groups.google.com/groups/opt_out.