-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspot.yml
78 lines (68 loc) · 2.39 KB
/
spot.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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
user: root # default ssh user. Can be overridden by -u flag or by inventory or host definition
ssh_key: ~/.ssh/onering_ed25519 # ssh key
ssh_shell: /bin/bash # shell to use for remote ssh execution, default is /bin/sh
local_shell: /bin/bash # shell to use for local execution, default is os shell
targets:
- "feziv.ru"
task:
- name: some command
script: |
echo all good, 123
- name: build
options: { local: true }
script: |
make build
- name: deploy
# # # list of targets, i.e. hosts, inventory files or inventory URLs
# # targets:
# # prod:
# # hosts: # list of hosts, user, name and port optional.
# # - { host: "ya.ru", user: "root", name: "h1" }
# # list of tasks, i.e. commands to execute
# tasks:
# - name: deploy-things
# # on_error: "curl -s localhost:8080/error?msg={SPOT_ERROR}" # call hook on error
# commands:
# - name: some command
# script: |
# ls -laR /tmp
# du -hcs /srv
# cat /tmp/conf.yml
# echo all good, 123
# # - name: wait
# # script: sleep 5s
# # - name: copy configuration
# # copy:
# # { "src": "testdata/conf.yml", "dst": "/tmp/conf.yml", "mkdir": true }
# # - name: copy other files
# # copy:
# # - {
# # "src": "testdata/f1.csv",
# # "dst": "/tmp/things/f1.csv",
# # "recur": true,
# # }
# # - {
# # "src": "testdata/f2.csv",
# # "dst": "/tmp/things/f2.csv",
# # "recur": true,
# # }
# # - name: sync things
# # sync: { "src": "testdata", "dst": "/tmp/things" }
# # - 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 } # set environment variables for the command
# # - wait: {
# # cmd: "curl -s localhost:8080/health",
# # timeout: "10s",
# # interval: "1s",
# # } # wait for health check to pass