From 1b049471566fbbf3b2645ec76ee87e9fb9147254 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Fri, 18 Aug 2017 15:01:33 -0500 Subject: [PATCH] Add role for emitting ara logs on the executor Change-Id: I7e5270bcf64f9834e40983ff3bdac59f6582d599 --- roles/emit-ara-html/README.rst | 1 + roles/emit-ara-html/tasks/main.yaml | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 roles/emit-ara-html/README.rst create mode 100644 roles/emit-ara-html/tasks/main.yaml diff --git a/roles/emit-ara-html/README.rst b/roles/emit-ara-html/README.rst new file mode 100644 index 000000000..75f667af7 --- /dev/null +++ b/roles/emit-ara-html/README.rst @@ -0,0 +1 @@ +Have ara generate html logs if ara and ara data are both present. diff --git a/roles/emit-ara-html/tasks/main.yaml b/roles/emit-ara-html/tasks/main.yaml new file mode 100644 index 000000000..f04a2aa89 --- /dev/null +++ b/roles/emit-ara-html/tasks/main.yaml @@ -0,0 +1,16 @@ +- name: Check for ara db + stat: + path: "{{ zuul.executor.work_root }}/.ara/ansible.sqlite" + register: ara_db_stat + +- name: Check for ara install + args: + executable: /bin/bash + command: type -p ara + ignore_errors: yes + register: ara_command_type + when: ara_db_stat.stat.exists + +- name: Generate ara html output + command: ara generate html "{{ zuul.executor.log_root/ara }}" + when: ara_command_type|succeeded and not ara_command_type|skipped