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