-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsetup.yml
executable file
·63 lines (51 loc) · 1.26 KB
/
setup.yml
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
---
- hosts: provisioner
become: yes
vars:
- copy_osie: true
tasks:
- name: Install dependencies
apt:
name:
- docker
- docker-compose
- jq
- ifupdown
state: present
# - name: Copy OSIE
# copy:
# src: osie.tar.gz
# dest: /root/osie.tar.gz
# when: copy_osie
- name: Git checkout
git:
repo: 'https://github.com/tinkerbell/sandbox.git'
dest: /root/sandbox
force: yes
version: v0.4.0
- name: Generate envrc
shell:
cmd: ./generate-envrc.sh {{ network_interface }} > envrc
chdir: /root/sandbox
- name: Add OSIE file location to envrc
shell:
cmd: echo 'export TB_OSIE_TAR=/root/osie.tar.gz' >> envrc
chdir: /root/sandbox
when: copy_osie
- name: Prepare envrc
replace:
regexp: "192.168.1"
replace: "192.168.3"
path: /root/sandbox/envrc
- name: Prepare .env
shell:
cmd: cat envrc | sed 's/export //g' > .env
chdir: /root/sandbox
- name: Run setup
shell:
cmd: . ./envrc && ./setup.sh
chdir: /root/sandbox
- name: docker-compose up
shell:
cmd: . ../envrc && docker-compose down && docker-compose up --force-recreate -d
chdir: /root/sandbox/deploy