From 0caff050fcfbf02e255693dae4893e926ee3ba50 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Sun, 12 Oct 2014 15:00:03 +0200 Subject: ansible: add result downloading * ansible/fedora.yml: Make the ./run non-fatal. Include download-results.yml and add skeleton for VM shutdown. * ansible/include/download-results.yml: Download the run results into directory specified by opt_tmp_resultdir. --- ansible/fedora.yml | 13 +++++++++++-- ansible/include/download-results.yml | 3 +++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 ansible/include/download-results.yml diff --git a/ansible/fedora.yml b/ansible/fedora.yml index 825d7c9..8e09402 100644 --- a/ansible/fedora.yml +++ b/ansible/fedora.yml @@ -57,5 +57,14 @@ - include: include/prepare-testenv.yml - - shell: cd /root && tar -xf postgresql-setup-tests.tar.gz && - cd postgresql-setup-tests && ./run + - shell: cd /root && tar -xf postgresql-setup-tests.tar.gz + + - shell: cd /root/postgresql-setup-tests && ./run + - register: test_result + - ignore_errors: yes + + - include: include/download-results.yml + + - name: stop the vm + - shell: echo "not implemented yet + - when: test_result.rc == 0 diff --git a/ansible/include/download-results.yml b/ansible/include/download-results.yml new file mode 100644 index 0000000..07f1382 --- /dev/null +++ b/ansible/include/download-results.yml @@ -0,0 +1,3 @@ +- shell: cd /var/tmp ; tar -czf dtf.tar.gz dtf + +- fetch: src=/var/tmp/dtf.tar.gz dest={{ opt_tmp_resultdir }} flat=yes -- cgit