mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 22:02:50 +00:00
Only test map on jinja2 >= 2.7
This commit is contained in:
@@ -111,6 +111,9 @@
|
|||||||
- "31 == ['x','y']|map('extract',{'x':42,'y':31})|list|last"
|
- "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"
|
||||||
- "'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
|
- name: Test json_query filter
|
||||||
assert:
|
assert:
|
||||||
|
|||||||
Reference in New Issue
Block a user