diff --git a/tests/post.yml b/tests/post.yml index 68f8f08ff1..d84eeea3ef 100644 --- a/tests/post.yml +++ b/tests/post.yml @@ -37,15 +37,22 @@ - hosts: primary tasks: - - name: ensure ara-report folder existence - file: - path: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}/ara-report" - state: directory - delegate_to: localhost - run_once: true + - name: check for existence of ara sqlite + stat: + path: "{{ ansible_env.HOME }}/.ara/ansible.sqlite" + register: ara_stat_result - - name: download ara sqlite - synchronize: - src: "{{ ansible_env.HOME }}/.ara/ansible.sqlite" - dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}/ara-report/" - mode: pull + - block: + - name: ensure ara-report folder existence + file: + path: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}/ara-report" + state: directory + delegate_to: localhost + run_once: true + + - name: download ara sqlite + synchronize: + src: "{{ ansible_env.HOME }}/.ara/ansible.sqlite" + dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}/ara-report/" + mode: pull + when: ara_stat_result.stat.exists