author | Luke Hoersten <luke@hoersten.org> |
Sat, 29 May 2021 11:25:11 -0500 | |
changeset 151 | 9a0b90751216 |
parent 143 | 7d4a477be685 |
child 227 | 2e0366f2dcbe |
permissions | -rw-r--r-- |
60 | 1 |
--- |
2 |
||
141
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
3 |
- name: add pleroma user |
60 | 4 |
become: yes |
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
5 |
user: name="pleroma" shell="/bin/false" home="/opt/pleroma" system="yes" |
60 | 6 |
|
101 | 7 |
- name: apt install pleroma dependencies |
8 |
become: yes |
|
143
7d4a477be685
Updated pleroma to 2.2.0 and added new dep.
Luke Hoersten <luke@hoersten.org>
parents:
141
diff
changeset
|
9 |
apt: name="{{item}}" |
7d4a477be685
Updated pleroma to 2.2.0 and added new dep.
Luke Hoersten <luke@hoersten.org>
parents:
141
diff
changeset
|
10 |
loop: |
7d4a477be685
Updated pleroma to 2.2.0 and added new dep.
Luke Hoersten <luke@hoersten.org>
parents:
141
diff
changeset
|
11 |
- "libmagic-dev" |
7d4a477be685
Updated pleroma to 2.2.0 and added new dep.
Luke Hoersten <luke@hoersten.org>
parents:
141
diff
changeset
|
12 |
- "libtinfo5" |
101 | 13 |
|
141
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
14 |
- name: create pleroma config and data directories |
60 | 15 |
become: yes |
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
16 |
file: |
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
17 |
path: "{{item}}" |
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
18 |
state: "directory" |
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
19 |
mode: "0755" |
143
7d4a477be685
Updated pleroma to 2.2.0 and added new dep.
Luke Hoersten <luke@hoersten.org>
parents:
141
diff
changeset
|
20 |
loop: |
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
21 |
- "{{pleroma_data_dir}}" |
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
22 |
- "/etc/pleroma" |
85
dcfd23308c32
Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents:
84
diff
changeset
|
23 |
- "/opt/pleroma" |
60 | 24 |
|
87
4f87097dd651
Got pleroma otp multi-instance working.
Luke Hoersten <luke@hoersten.org>
parents:
85
diff
changeset
|
25 |
- name: configure pleroma systemd service |
85
dcfd23308c32
Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents:
84
diff
changeset
|
26 |
become: yes |
dcfd23308c32
Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents:
84
diff
changeset
|
27 |
copy: |
dcfd23308c32
Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents:
84
diff
changeset
|
28 |
src: "[email protected]" |
dcfd23308c32
Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents:
84
diff
changeset
|
29 |
dest: "/lib/systemd/system/[email protected]" |
dcfd23308c32
Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents:
84
diff
changeset
|
30 |
notify: restart pleroma instance |
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
31 |
|
141
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
32 |
- name: check if pleroma release exists |
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
33 |
stat: path="/tmp/release/" |
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
34 |
register: release |
84
d0c40727e6ff
Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents:
81
diff
changeset
|
35 |
|
141
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
36 |
- include_tasks: install.yaml |
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
37 |
when: not release.stat.exists |
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
38 |
|
0708c9c075fc
Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
122
diff
changeset
|
39 |
- include_tasks: instance.yaml |