author | Luke Hoersten <luke@hoersten.org> |
Fri, 15 Sep 2023 22:46:19 -0500 | |
changeset 221 | a7bb0c129c0a |
parent 218 | 1db4800bc4f5 |
permissions | -rw-r--r-- |
214 | 1 |
--- |
2 |
||
218 | 3 |
- name: add lnurld user |
214 | 4 |
become: yes |
218 | 5 |
user: name="{{lnurld_user}}" shell="/bin/false" system="yes" |
214 | 6 |
|
218 | 7 |
- name: install lnurld bin |
214 | 8 |
become: yes |
217
e69a030975c4
Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents:
214
diff
changeset
|
9 |
get_url: |
218 | 10 |
url: "{{lnurld_bin_url}}" |
11 |
dest: "/usr/local/bin/lnurld" |
|
214 | 12 |
mode: "0755" |
218 | 13 |
notify: restart lnurld service |
214 | 14 |
|
218 | 15 |
- name: create lnurld data dir |
214 | 16 |
become: yes |
17 |
file: |
|
218 | 18 |
path: "{{lnurld_data_dir}}" |
19 |
mode: "0710" |
|
20 |
owner: "{{lnurld_user}}" |
|
21 |
group: "{{lnurld_user}}" |
|
22 |
state: "directory" |
|
23 |
||
24 |
- name: create lnurld etc dir |
|
25 |
become: yes |
|
26 |
file: |
|
27 |
path: "/etc/lnurld/" |
|
214 | 28 |
mode: "0755" |
29 |
state: "directory" |
|
30 |
||
218 | 31 |
- name: install lnurld config |
214 | 32 |
become: yes |
33 |
template: |
|
218 | 34 |
src: "config.yaml.j2" |
35 |
dest: "/etc/lnurld/config.yaml" |
|
36 |
owner: "{{lnurld_user}}" |
|
37 |
group: "{{lnurld_user}}" |
|
214 | 38 |
mode: "0600" |
218 | 39 |
notify: restart lnurld service |
214 | 40 |
|
218 | 41 |
- name: install lnurld systemd service |
214 | 42 |
become: yes |
43 |
template: |
|
218 | 44 |
src: "lnurld.service.j2" |
45 |
dest: "/lib/systemd/system/lnurld.service" |
|
46 |
notify: restart lnurld service |
|
214 | 47 |
|
48 |
- name: ensure service is started |
|
49 |
become: yes |
|
218 | 50 |
systemd: name="lnurld.service" enabled="yes" state="started" |