diff options
author | Matt Clay <matt@mystile.com> | 2017-01-19 10:54:26 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2017-01-19 12:22:01 -0800 |
commit | 36d8612ac0fdd9735f0f17b7de17370235a6be6f (patch) | |
tree | 474be61e3269c367353597e3f6a7a0b50f47d240 | |
parent | 799b180e2d6b96e1cc3289096fda0b4a0fdd5956 (diff) | |
download | ansible-36d8612ac0fdd9735f0f17b7de17370235a6be6f.tar.gz |
Use jinja2 import instead of pip to get version.
This resolves issues with older versions of pip.
(cherry picked from commit a8fb6f0958704c2f6d5b1be776423dc6263a82cf)
-rw-r--r-- | test/integration/roles/test_filters/tasks/main.yml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/integration/roles/test_filters/tasks/main.yml b/test/integration/roles/test_filters/tasks/main.yml index 2899cc4a77..7b54d45898 100644 --- a/test/integration/roles/test_filters/tasks/main.yml +++ b/test/integration/roles/test_filters/tasks/main.yml @@ -78,5 +78,5 @@ - "'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', '>=') ) }}" |