Jinja wants to play hard to get

This commit is contained in:
Elijah Lazkani 2017-03-19 00:11:40 -04:00
parent fb76c4f34a
commit c5b63d62f7

View file

@ -2,9 +2,9 @@
{% if grains['travis'] == True and grains['kernel'] == 'Linux' %}
{% if "python2" in grains['pip'] %}
{% python_env.update({ 'pip_bin_env': '/opt/python/3.5.2/bin/pip3'}) %}
{% set pip_travis_env = '/opt/python/3.5.2/bin/pip3' %}
{% else %}
{% python_env.update({'pip_bin_env': grains['pip']}) %}
{% set pip_travis_env = grains['pip'] %}
{% endif %}
{% endif %}
@ -16,7 +16,11 @@ virtualenv-install:
pip.installed:
- name: {{ python_env.virtualenv }}
- user: {{ grains.user }}
{% if grains['travis'] == True and grains['kernel'] == 'Linux' %}
- bin_env: {{ pip_bin_env }}
{% else %}
- bin_env: {{ python_env.pip_bin_env }}
{% endif %}
- require:
- pkg: pip-install
@ -24,7 +28,11 @@ virtualenvwrapper-install:
pip.installed:
- name: {{ python_env.virtualenvwrapper }}
- user: {{ grains.user }}
{% if grains['travis'] == True and grains['kernel'] == 'Linux' %}
- bin_env: {{ pip_bin_env }}
{% else %}
- bin_env: {{ python_env.pip_bin_env }}
{% endif %}
- require:
- pip: virtualenv-install