1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Test the extract filter without the map filter.

map + extract is the usual way to use it but map isn't available on
older versions of jinja2 that we still work with.  Test extract even on
those versions.
This commit is contained in:
Toshio Kuratomi 2017-01-16 12:57:45 -08:00
parent e2bd71ac02
commit 32fbd4ba24

View file

@ -95,6 +95,13 @@
assert:
that: "{{_.failed}}"
- name: Test extract
assert:
that:
- '"c" == 2 | extract(["a", "b", "c"])'
- '"b" == 1 | extract(["a", "b", "c"])'
- '"a" == 0 | extract(["a", "b", "c"])'
- name: Container lookups with extract
assert:
that: