zuul-jobs/test-playbooks/tox/reinstall-tox.yaml
Sorin Sbarnea 5c263fb437 test-playbooks: avoid warnings with shell/command
Avoids runtime warnings from use of Ansible shell/command module when
executed commands also have ansible modules.

Change-Id: I4e415cbd34f0f4cb15857051bf95458e0316de86
2020-06-04 18:54:37 +01:00

22 lines
515 B
YAML

- hosts: all
name: Remove any pre-installed tox
tasks:
- name: Remove tox package with pip
shell: pip uninstall -y tox
args:
warn: false
become: true
failed_when: false
- name: Remove tox package with pip3
shell: pip3 uninstall -y tox
args:
warn: false
become: true
failed_when: false
- name: Verify tox is not installed
command: "tox --version"
register: result
failed_when: result.rc == 0
roles:
- ensure-tox