author | Luke Hoersten <luke@hoersten.org> |
Tue, 12 May 2020 19:19:36 -0500 | |
changeset 4 | 9934a00b9e97 |
parent 2 | 0556e208fbee |
permissions | -rw-r--r-- |
0
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
1 |
--- |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
2 |
|
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
3 |
- name: create node data dir |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
4 |
become: yes |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
5 |
file: |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
6 |
path: "{{item}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
7 |
state: "directory" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
8 |
owner: "{{node_user}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
9 |
group: "{{node_user}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
10 |
mode: "0770" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
11 |
with_items: |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
12 |
- "{{node_data_dir}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
13 |
- "{{node_log_dir}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
14 |
- "{{node_conf_dir}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
15 |
|
4 | 16 |
- name: configure node |
0
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
17 |
become: yes |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
18 |
template: |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
19 |
src: "{{node_conf_template}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
20 |
dest: "{{node_conf_dir}}/{{node_type}}.conf" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
21 |
owner: "{{node_user}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
22 |
group: "{{node_user}}" |
2
0556e208fbee
Made btcd and lnd arch changeable.
Luke Hoersten <luke@hoersten.org>
parents:
0
diff
changeset
|
23 |
mode: "0644" |
0
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
24 |
notify: restart node |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
25 |
|
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
26 |
- name: install node service |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
27 |
become: yes |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
28 |
template: |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
29 |
src: "{{node_service_template}}" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
30 |
dest: "/lib/systemd/system/{{node_type}}.service" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
31 |
mode: "0644" |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
32 |
notify: restart node |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
33 |
|
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
34 |
- name: ensure node is started |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
35 |
become: yes |
474ccafc2349
Initial commit of btcd and lnd roles.
Luke Hoersten <luke@hoersten.org>
parents:
diff
changeset
|
36 |
systemd: service="{{node_type}}.service" enabled="yes" state="started" daemon_reload="yes" |