zuul-jobs/roles/ensure-tox/tasks/main.yaml

19 lines
368 B
YAML

- name: Ensure tox is installed
shell: |
set -euo pipefail
if command -v pip; then
PIP=pip
elif command -v pip3; then
PIP=pip3
fi
type tox || $PIP install --user tox
args:
executable: /bin/bash
register: result
changed_when: "'Successfully installed' in result.stdout"
- name: Output tox version
command: tox --version