summaryrefslogtreecommitdiff
path: root/test/integration/targets/filters
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2017-01-16 13:16:51 -0800
committerMatt Clay <matt@mystile.com>2017-01-16 13:41:42 -0800
commitad652746437b4e7d225a9725a501ca1cdfd07969 (patch)
tree943eeffe62ca0387ed8fa1ac4a1c05bf81497dc2 /test/integration/targets/filters
parent32fbd4ba24d1bdfc40b121277f3e50f6c1237539 (diff)
downloadansible-ad652746437b4e7d225a9725a501ca1cdfd07969.tar.gz
Only test map on jinja2 >= 2.7
Diffstat (limited to 'test/integration/targets/filters')
-rw-r--r--test/integration/targets/filters/tasks/main.yml3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/integration/targets/filters/tasks/main.yml b/test/integration/targets/filters/tasks/main.yml
index a6f0f4f74d..3558c4e293 100644
--- a/test/integration/targets/filters/tasks/main.yml
+++ b/test/integration/targets/filters/tasks/main.yml
@@ -111,6 +111,9 @@
- "31 == ['x','y']|map('extract',{'x':42,'y':31})|list|last"
- "'local' == ['localhost']|map('extract',hostvars,'ansible_connection')|list|first"
- "'local' == ['localhost']|map('extract',hostvars,['ansible_connection'])|list|first"
+ # map was added to jinja2 in version 2.7
+ when: "{{ ( lookup('pipe', 'pip show --disable-pip-version-check jinja2 | grep ^Version: | sed \"s/^Version: //\"') |
+ version_compare('2.7', '>=') ) }}"
- name: Test json_query filter
assert: