-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlaunch.yaml
45 lines (40 loc) · 1.05 KB
/
launch.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
---
- hosts: all
become: no
vars:
ciab_url: "https://raw.githubusercontent.com/opencord/cord/master/scripts/cord-in-a-box.sh"
ciab_script: "~/cord-in-a-box.sh"
ciab_output: "~/cord-in-a-box.out"
ciab_copy: false
ciab_file: "~/gerrit.opencord.org/cord/scripts/cord-in-a-box.sh"
tasks:
- name: Install mosh
become: yes
apt:
name: mosh
state: present
update_cache: yes
- name: Download cord-in-a-box.sh script
get_url:
url: "{{ ciab_url }}"
dest: "{{ ciab_script }}"
mode: 0755
register: result
until: result | success
retries: 3
delay: 1
when: not ciab_copy
- name: Copy in cord-in-a-box.sh script
copy:
src: "{{ ciab_file }}"
dest: "{{ ciab_script }}"
when: ciab_copy
- name: Run cord-in-a-box.sh script
shell: bash {{ ciab_script }} -t | tee {{ ciab_output }}
async: 14400
poll: 60
- name: Fetch log
fetch:
src={{ ciab_output }}
dest=logs/{{ aggregate }}.{{ slice }}.{{ ansible_date_time.iso8601 }}
flat=yes