From 1921599a330c91c51168d9244458e8da74ea2866 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 13 Oct 2017 07:34:48 -0500 Subject: [PATCH] Add role to ensure per-node output dirs exist To move the output interface onto the nodes, we need to make sure the dirs exist on the nodes so people can count on them for putting stuff in them. Change-Id: I969218f59c3fc237e1b85f016a7d0c1548a0b073 --- roles/ensure-output-dirs/README.rst | 8 ++++++++ roles/ensure-output-dirs/defaults/main.yaml | 1 + roles/ensure-output-dirs/tasks/main.yaml | 8 ++++++++ 3 files changed, 17 insertions(+) create mode 100644 roles/ensure-output-dirs/README.rst create mode 100644 roles/ensure-output-dirs/defaults/main.yaml create mode 100644 roles/ensure-output-dirs/tasks/main.yaml diff --git a/roles/ensure-output-dirs/README.rst b/roles/ensure-output-dirs/README.rst new file mode 100644 index 000000000..18709873b --- /dev/null +++ b/roles/ensure-output-dirs/README.rst @@ -0,0 +1,8 @@ +Ensure output directories are in place + +**Role Variables** + +.. zuul:rolevar:: zuul_output_dir + :default: {{ ansible_user_dir }}/zuul-output + + Base directory for collecting job output. diff --git a/roles/ensure-output-dirs/defaults/main.yaml b/roles/ensure-output-dirs/defaults/main.yaml new file mode 100644 index 000000000..3e6da11a9 --- /dev/null +++ b/roles/ensure-output-dirs/defaults/main.yaml @@ -0,0 +1 @@ +zuul_output_dir: "{{ ansible_user_dir }}/zuul-output" diff --git a/roles/ensure-output-dirs/tasks/main.yaml b/roles/ensure-output-dirs/tasks/main.yaml new file mode 100644 index 000000000..2c2a82193 --- /dev/null +++ b/roles/ensure-output-dirs/tasks/main.yaml @@ -0,0 +1,8 @@ +- name: Ensure Zuul Output directories exist + file: + path: "{{ zuul_output_dir }}/{{ item }}" + state: directory + with_items: + - logs + - artifacts + - docs