Commit a1294c78 authored by JANON Alexis's avatar JANON Alexis

Initial commit

parents
This diff is collapsed.
# ansible_experiment
# Copyright (C) 2019 JANON Alexis
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
- name: Prepare, run experiment, retrieve results
hosts: all
tasks:
- name: Prepare remote host before copying
file:
path: "{{ ansible_env.HOME }}/repo"
state: directory
- name: Copy repository to remote host
synchronize:
dest: "{{ ansible_env.HOME }}/repo"
src: "{{ git_root }}/"
- name: Setup experiment
command:
argv:
- "{{ ansible_env.HOME }}/repo/setup/run"
register: results_dir
- name: Run experiment
command:
argv:
- "{{ ansible_env.HOME }}/repo/experiment/run"
- "{{ results_dir }}"
- name: Teardown experiment
command:
argv:
- "{{ ansible_env.HOME }}/repo/teardown/run"
- "{{ results_dir }}"
- name: Create local results directory
local_action:
file:
path: "{{ git_root }}/results"
state: directory
- name: Retrieve results
synchronize:
mode: pull
dest: "{{ git_root }}/results/"
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