Ensure virtualenv is on the destination host

The virtualenv package is required in order to
both prepare a virtualenv in the build stage,
and to ensure that the right python binary is
in the virtualenv in the install stage.

This patch ensures that the virtualenv is
installed on the destination host.
This commit is contained in:
Jesse Pretorius 2018-03-23 12:47:38 +00:00
parent 7a01d139ff
commit b7010f8e7c
1 changed files with 10 additions and 0 deletions

View File

@ -43,3 +43,13 @@
run_once: yes
when:
- venv_reuse_enable | bool
- name: Ensure that virtualenv is installed on the destination host
pip:
name: virtualenv
state: latest
extra_args: "{{ host_pip_install_args }}"
register: _install_host_pip_virtualenv
until: _install_host_pip_virtualenv | success
retries: 5
delay: 2