Use jinja2 import instead of pip to get version.
This resolves issues with older versions of pip.
(cherry picked from commit a8fb6f0958
)
This commit is contained in:
parent
799b180e2d
commit
36d8612ac0
1 changed files with 1 additions and 1 deletions
|
@ -78,5 +78,5 @@
|
||||||
- "'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
|
# 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', '>=') ) }}"
|
version_compare('2.7', '>=') ) }}"
|
||||||
|
|
Loading…
Reference in a new issue