equal
deleted
inserted
replaced
|
1 --- |
|
2 |
|
3 - name: add lnd user |
|
4 become: yes |
|
5 user: name="{{lnd_user}}" |
|
6 |
|
7 - name: unarchive lnd |
|
8 become: yes |
|
9 unarchive: |
|
10 remote_src: yes |
|
11 src: "{{item.url}}" |
|
12 dest: "/tmp" |
|
13 creates: "/tmp/{{item.tar_name}}/" |
|
14 loop: |
|
15 - url: "{{lnd_url}}" |
|
16 tar_name: "{{lnd_tar_name}}" |
|
17 - url: "{{lndconnect_url}}" |
|
18 tar_name: "{{lndconnect_tar_name}}" |
|
19 |
|
20 - name: install lnd |
|
21 become: yes |
|
22 copy: |
|
23 src: "/tmp/{{item.tar_name}}/" |
|
24 dest: "/usr/local/bin/{{item.bins}}" |
|
25 remote_src: yes |
|
26 owner: "root" |
|
27 group: "root" |
|
28 mode: "0755" |
|
29 loop: |
|
30 - tar_name: "{{lnd_tar_name}}" |
|
31 bins: |
|
32 - "lnd" |
|
33 - "lncli" |
|
34 - tar_name: "{{lndconnect_tar_name}}" |
|
35 bins: |
|
36 - "lndconnect" |
|
37 |
|
38 - name: create lnd data dir |
|
39 become: yes |
|
40 file: |
|
41 path: "{{item}}" |
|
42 state: "directory" |
|
43 owner: "{{lnd_user}}" |
|
44 group: "{{lnd_user}}" |
|
45 mode: "0770" |
|
46 with_items: |
|
47 - "{{lnd_data_dir}}" |
|
48 - "{{lnd_log_dir}}" |
|
49 - "{{lnd_conf_dir}}" |
|
50 |
|
51 - name: configure lnd |
|
52 become: yes |
|
53 template: |
|
54 src: "lnd.conf.j2" |
|
55 dest: "{{lnd_conf_dir}}/lnd.conf" |
|
56 owner: "{{lnd_user}}" |
|
57 group: "{{lnd_user}}" |
|
58 mode: "0644" |
|
59 notify: restart lnd |
|
60 |
|
61 - name: install lnd service |
|
62 become: yes |
|
63 template: |
|
64 src: "lnd.service.j2" |
|
65 dest: "/lib/systemd/system/lnd.service" |
|
66 mode: "0644" |
|
67 notify: restart lnd |
|
68 |
|
69 - name: ensure lnd is started |
|
70 become: yes |
|
71 systemd: service="lnd.service" enabled="yes" state="started" daemon_reload="yes" |