Commit 76408261 authored by JANON Alexis's avatar JANON Alexis

main.yml: does not ignore experiment errors anymore

If an error occurs, it will (should) count the play as a failure. The 'always'
section should ensure that the teardown is executed and the results retrieved.
parent bddbb001
......@@ -40,28 +40,30 @@
- "{{ results_dir }}"
args:
creates: "{{ results_dir }}/setup.tar.xz"
- name: Run experiment
command:
argv:
- "{{ ansible_env.HOME }}/repo/experiment/run"
- "{{ base_dir }}"
- "{{ results_dir }}"
ignore_errors: yes
- name: Teardown experiment
command:
argv:
- "{{ ansible_env.HOME }}/repo/teardown/run"
- "{{ results_dir }}"
args:
creates: "{{ results_dir }}/teardown.tar.xz"
- name: Create local results directory
file:
path: "{{ git_root }}/results/{{ timestamp }}"
state: directory
delegate_to: localhost
- name: Retrieve results
synchronize:
mode: pull
dest: "{{ git_root }}/results/{{ timestamp }}/"
src: "{{ results_dir }}"
- name: Run experiment and handle errors
block:
- name: Run experiment
command:
argv:
- "{{ ansible_env.HOME }}/repo/experiment/run"
- "{{ base_dir }}"
- "{{ results_dir }}"
always:
- name: Teardown experiment
command:
argv:
- "{{ ansible_env.HOME }}/repo/teardown/run"
- "{{ results_dir }}"
args:
creates: "{{ results_dir }}/teardown.tar.xz"
- name: Create local results directory
file:
path: "{{ git_root }}/results/{{ timestamp }}"
state: directory
delegate_to: localhost
- name: Retrieve results
synchronize:
mode: pull
dest: "{{ git_root }}/results/{{ timestamp }}/"
src: "{{ results_dir }}"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment