From 0f8e15e4271f76a955d88b36993b3582220f06f8 Mon Sep 17 00:00:00 2001 From: Federico Ressi Date: Wed, 19 Feb 2020 14:05:47 +0100 Subject: [PATCH] Collect tobiko.conf file on CI jobs Change-Id: I9a3e158d7fb3aff86e1430b550a49977d53e5b26 --- roles/tobiko/tasks/main.yaml | 1 + roles/tobiko/tasks/post/config.yaml | 15 +++++++++++++++ 2 files changed, 16 insertions(+) create mode 100644 roles/tobiko/tasks/post/config.yaml diff --git a/roles/tobiko/tasks/main.yaml b/roles/tobiko/tasks/main.yaml index 8ac7c3904..4975ae2ff 100644 --- a/roles/tobiko/tasks/main.yaml +++ b/roles/tobiko/tasks/main.yaml @@ -23,5 +23,6 @@ - when: tobiko_post_run | bool block: + - include: post/config.yaml - include: post/report.yaml - include: post/log.yaml diff --git a/roles/tobiko/tasks/post/config.yaml b/roles/tobiko/tasks/post/config.yaml new file mode 100644 index 000000000..2ca4f3dfd --- /dev/null +++ b/roles/tobiko/tasks/post/config.yaml @@ -0,0 +1,15 @@ +--- + +- name: check if {{ tobiko_conf_file }} file exists + stat: + path: "{{ tobiko_conf_file }}" + register: check_tobiko_conf_file + + +- name: "Collect {{ tobiko_conf_file }} file" + synchronize: + dest: "{{ collect_files_dir }}" + mode: pull + src: "{{ tobiko_conf_file }}" + verify_host: true + when: check_tobiko_conf_file.stat.exists