From 32fbd4ba24d1bdfc40b121277f3e50f6c1237539 Mon Sep 17 00:00:00 2001 From: Toshio Kuratomi Date: Mon, 16 Jan 2017 12:57:45 -0800 Subject: [PATCH] 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. --- test/integration/targets/filters/tasks/main.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/integration/targets/filters/tasks/main.yml b/test/integration/targets/filters/tasks/main.yml index fce05c0c210..a6f0f4f74d3 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: