author | Luke Hoersten <luke@hoersten.org> |
Mon, 07 Oct 2024 23:31:51 -0500 | |
changeset 239 | c3e3169399a8 |
parent 237 | c6c11084c802 |
permissions | -rw-r--r-- |
214 | 1 |
--- |
2 |
||
3 |
- name: add relayer user |
|
4 |
become: yes |
|
5 |
user: name="{{relayer_user}}" shell="/bin/false" create_home="false" system="yes" |
|
6 |
||
7 |
- name: install relayer systemd service |
|
8 |
become: yes |
|
9 |
copy: |
|
10 |
src: "relayer.service" |
|
11 |
dest: "/lib/systemd/system/relayer.service" |
|
12 |
notify: restart relayer service |
|
13 |
||
14 |
- name: install relayer bin |
|
15 |
become: yes |
|
217
e69a030975c4
Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents:
214
diff
changeset
|
16 |
get_url: |
e69a030975c4
Split out nostr install and build roles.
Luke Hoersten <luke@hoersten.org>
parents:
214
diff
changeset
|
17 |
url: "{{relayer_bin_url}}" |
214 | 18 |
dest: "/usr/local/bin/relayer" |
19 |
owner: "root" |
|
20 |
group: "root" |
|
21 |
mode: "0755" |
|
22 |
notify: restart relayer service |
|
23 |
||
24 |
- name: create relayer dirs |
|
25 |
become: yes |
|
26 |
file: |
|
27 |
path: "/etc/relayer" |
|
28 |
owner: "root" |
|
29 |
group: "root" |
|
30 |
mode: "0755" |
|
31 |
state: "directory" |
|
32 |
||
33 |
- name: install relayer config |
|
34 |
become: yes |
|
35 |
template: |
|
36 |
src: "relayer.env.j2" |
|
37 |
dest: "/etc/relayer/relayer.env" |
|
38 |
owner: "root" |
|
39 |
group: "root" |
|
40 |
mode: "0600" |
|
41 |
notify: restart relayer service |
|
42 |
||
43 |
- name: copy db schema file |
|
44 |
become: yes |
|
45 |
template: |
|
46 |
src: "setup_db.psql.j2" |
|
47 |
dest: "/tmp/setup_db_relayer.psql" |
|
48 |
owner: "postgres" |
|
49 |
group: "postgres" |
|
50 |
mode: "0600" |
|
237
c6c11084c802
Cleaned up always-changed status tasks.
Luke Hoersten <luke@hoersten.org>
parents:
217
diff
changeset
|
51 |
changed_when: false |
214 | 52 |
|
53 |
- name: install db schema psql |
|
54 |
become: yes |
|
55 |
become_user: "postgres" |
|
56 |
command: "psql -f /tmp/setup_db_relayer.psql" |
|
57 |
changed_when: false |
|
58 |
||
59 |
- name: ensure service is started |
|
60 |
become: yes |
|
61 |
systemd: name="relayer.service" enabled="yes" state="started" |