Only test map on jinja2 >= 2.7

(cherry picked from commit ad65274643)
This commit is contained in:
Matt Clay 2017-01-16 13:16:51 -08:00
parent 26f5e4b32d
commit b2942f1084

View file

@ -104,6 +104,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: