Create extra-test-setup role

Some jobs need access to a database, as such implement our JJB macro
to run the tools/test-setup.sh file.

Change-Id: I90227beb41fe080544b3433805a1c8b7955217cb
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
diff --git a/playbooks/roles/extra-test-setup/tasks/main.yaml b/playbooks/roles/extra-test-setup/tasks/main.yaml
new file mode 100644
index 0000000..08e46f3
--- /dev/null
+++ b/playbooks/roles/extra-test-setup/tasks/main.yaml
@@ -0,0 +1,13 @@
+---
+- name: Check if tools/test-setup.sh exists.
+  stat:
+    path: "/home/zuul/workspace/src/{{ zuul.project }}/tools/test-setup.sh"
+  register: p
+
+- name: Run tools/test-setup.sh.
+  shell: tools/test-setup.sh
+  args:
+    chdir: "/home/zuul/workspace/src/{{ zuul.project }}"
+  when:
+    - p.stat.exists
+    - p.stat.executable