Sorin Sbarnea 2410119ac9 ensure-tox: improve pip detection
Fixed issues failing to install tox on python3 only systems which have
only pip3 executable and not the pip one.

Needed-By: https://review.rdoproject.org/r/#/c/24584/
Change-Id: Ie50928c9b782ea84db916bb1441567e1206ff466
2020-01-16 21:06:07 +00:00

10 lines
260 B
YAML

- name: Ensure tox is installed
shell: |
set -euo pipefail
PIP=$(command -v pip pip3 | head -n1)
type tox || $PIP install --user tox
args:
executable: /bin/bash
register: result
changed_when: "'Successfully installed' in result.stdout"