forked from umputun/spot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
spot-example.yml
50 lines (41 loc) · 1.18 KB
/
spot-example.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
user: app
ssh_key: ~/.ssh/id_rsa
inventory: "testdata/hosts-with-groups.yml"
targets:
prod:
hosts:
- {host: "h1.example.com", port: 2222, user: "app-user"}
- {host: "h2.example.com"}
staging:
groups: ["staging", "dev"]
dev:
groups: ["dev"]
tasks:
- name: deploy-things
commands:
- name: wait
script: sleep 5s
- name: copy configuration
copy: {"src": "testdata/conf.yml", "dst": "/tmp/conf.yml", "mkdir": true}
- name: sync things
sync: {"src": "testdata", "dst": "/tmp/things"}
- name: some command
script: |
echo ${SPOT_REMOTE_HOST}
ls -laR /tmp
du -hcs /srv
cat /tmp/conf.yml
echo all good, 123
- name: delete things
delete: {"path": "/tmp/things", "recur": true}
- name: show content
script: ls -laR /tmp
- name: docker
commands:
- name: docker pull and start
script: |
docker pull umputun/remark42:latest
docker stop remark42 || true
docker rm remark42 || true
docker run -d --name remark42 -p 8080:8080 umputun/remark42:latest
env: {FOO: bar, BAR: qux}