diff options
author | Toshio Kuratomi <a.badger@gmail.com> | 2017-01-16 12:57:45 -0800 |
---|---|---|
committer | Toshio Kuratomi <a.badger@gmail.com> | 2017-01-16 13:13:34 -0800 |
commit | 32fbd4ba24d1bdfc40b121277f3e50f6c1237539 (patch) | |
tree | e80e0d5a80d1ba72e55583dad56dbf04a62d1433 /test/integration/targets/filters | |
parent | e2bd71ac0229375b584df3d9f8c23466a90f2570 (diff) | |
download | ansible-32fbd4ba24d1bdfc40b121277f3e50f6c1237539.tar.gz |
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.
Diffstat (limited to 'test/integration/targets/filters')
-rw-r--r-- | test/integration/targets/filters/tasks/main.yml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/integration/targets/filters/tasks/main.yml b/test/integration/targets/filters/tasks/main.yml index fce05c0c21..a6f0f4f74d 100644 --- a/test/integration/targets/filters/tasks/main.yml +++ b/test/integration/targets/filters/tasks/main.yml @@ -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: |