author | Luke Hoersten <luke@hoersten.org> |
Sat, 22 Oct 2022 14:51:55 -0500 | |
changeset 199 | 9aa5f284ea10 |
parent 174 | 431c6d5e5dd4 |
permissions | -rw-r--r-- |
114 | 1 |
--- |
2 |
||
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
3 |
- name: add ergo user |
114 | 4 |
become: yes |
174 | 5 |
user: name="ergo" shell="/bin/false" system="yes" create_home="no" |
114 | 6 |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
7 |
- name: download ergo |
114 | 8 |
become: yes |
9 |
unarchive: |
|
10 |
remote_src: yes |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
11 |
src: "{{ergo_url}}" |
114 | 12 |
dest: "/tmp" |
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
13 |
creates: "/tmp/{{ergo_tar_name}}/" |
114 | 14 |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
15 |
- name: install ergo |
114 | 16 |
become: yes |
17 |
copy: |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
18 |
src: "/tmp/{{ergo_tar_name}}/ergo" |
114 | 19 |
dest: "/usr/local/bin/" |
20 |
remote_src: yes |
|
21 |
owner: "root" |
|
22 |
group: "root" |
|
23 |
mode: "0755" |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
24 |
notify: restart ergo |
114 | 25 |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
26 |
- name: create ergo dirs |
114 | 27 |
become: yes |
28 |
file: |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
29 |
path: "{{item}}/ergo" |
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
30 |
owner: "ergo" |
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
31 |
group: "ergo" |
114 | 32 |
mode: "0755" |
33 |
state: "directory" |
|
34 |
loop: |
|
35 |
- "/etc" |
|
36 |
- "/var" |
|
37 |
||
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
38 |
- name: configure ergo |
114 | 39 |
become: yes |
40 |
template: |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
41 |
src: "config.yaml.j2" |
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
42 |
dest: "/etc/ergo/config.yaml" |
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
43 |
owner: "ergo" |
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
44 |
group: "ergo" |
114 | 45 |
mode: "0644" |
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
46 |
notify: reload ergo |
114 | 47 |
|
48 |
- name: copy motd file |
|
49 |
become: yes |
|
50 |
copy: |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
51 |
src: "{{ergo_motd}}" |
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
52 |
dest: "/etc/ergo/motd" |
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
53 |
notify: reload ergo |
114 | 54 |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
55 |
- name: install ergo service |
114 | 56 |
become: yes |
137
645c1e109921
Moved oragono socket to more persistent location.
Luke Hoersten <luke@hoersten.org>
parents:
118
diff
changeset
|
57 |
copy: |
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
58 |
src: "ergo.service" |
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
59 |
dest: "/lib/systemd/system/ergo.service" |
114 | 60 |
mode: "0644" |
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
61 |
notify: restart ergo |
114 | 62 |
|
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
63 |
- name: ensure ergo is started |
114 | 64 |
become: yes |
170
a20a6d03747f
Updated versions: minecraft, miniflux, pleroma, writefreely, ergo-oragono.
Luke Hoersten <luke@hoersten.org>
parents:
137
diff
changeset
|
65 |
systemd: service="ergo.service" enabled="yes" state="started" daemon_reload="yes" |