mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Use jinja2 import instead of pip to get version.
This resolves issues with older versions of pip.
This commit is contained in:
parent
2a5d949c52
commit
a8fb6f0958
1 changed files with 1 additions and 1 deletions
|
@ -112,7 +112,7 @@
|
|||
- "'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: //\"') |
|
||||
when: "{{ ( lookup('pipe', '{{ ansible_python[\"executable\"] }} -c \"import jinja2; print(jinja2.__version__)\"') |
|
||||
version_compare('2.7', '>=') ) }}"
|
||||
|
||||
- name: Test json_query filter
|
||||
|
|
Loading…
Reference in a new issue