From dafe1bfcb492f54db767f979d1f7e5d020ab5446 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 22 Aug 2017 15:19:05 -0400 Subject: [PATCH] Split ensuring tox is installed into a role We do this in a few places, make it reusable. Change-Id: Ied118508dc4b8e4cbfca88b5636730664dbe10b4 --- playbooks/tox/pre.yaml | 5 ++--- roles/ensure-tox/tasks/main.yaml | 2 ++ 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 roles/ensure-tox/tasks/main.yaml diff --git a/playbooks/tox/pre.yaml b/playbooks/tox/pre.yaml index 2223d7dd6..69e7def02 100644 --- a/playbooks/tox/pre.yaml +++ b/playbooks/tox/pre.yaml @@ -1,4 +1,3 @@ - hosts: all - tasks: - - name: Ensure tox is installed - shell: type tox || pip install --user tox + roles: + - ensure-tox diff --git a/roles/ensure-tox/tasks/main.yaml b/roles/ensure-tox/tasks/main.yaml new file mode 100644 index 000000000..b2b7487eb --- /dev/null +++ b/roles/ensure-tox/tasks/main.yaml @@ -0,0 +1,2 @@ +- name: Ensure tox is installed + shell: type tox || pip install --user tox