author | Luke Hoersten <luke@hoersten.org> |
Fri, 28 Dec 2018 00:27:10 -0500 | |
changeset 64 | 2b0d305daa43 |
parent 63 | 56531bbfd074 |
child 65 | 4538ad030906 |
permissions | -rw-r--r-- |
60 | 1 |
--- |
2 |
||
3 |
- name: add erland solutions key |
|
4 |
become: yes |
|
5 |
apt_key: "url=http://packages.erlang-solutions.com/debian/erlang_solutions.asc" |
|
6 |
||
7 |
- name: install erland solutions repo |
|
8 |
become: yes |
|
9 |
apt_repository: repo="deb http://binaries.erlang-solutions.com/debian bionic contrib" |
|
10 |
||
11 |
- name: update apt package cache |
|
12 |
become: yes |
|
13 |
apt: upgrade="dist" update_cache="yes" cache_valid_time="3600" |
|
14 |
||
15 |
- name: install extra apt packages |
|
16 |
become: yes |
|
17 |
apt: name="{{item}}" |
|
18 |
with_items: |
|
19 |
- "postgresql" |
|
20 |
- "esl-erlang" |
|
21 |
- "elixir" |
|
22 |
- "build-essential" |
|
23 |
- "git" |
|
24 |
||
25 |
- name: add users |
|
26 |
become: yes |
|
27 |
user: name="{{pleroma_user}}" shell="/bin/bash" |
|
28 |
||
29 |
- name: checkout plemora |
|
30 |
become: yes |
|
31 |
become_user: "{{pleroma_user}}" |
|
32 |
git: |
|
33 |
repo: "https://git.pleroma.social/pleroma/pleroma.git" |
|
34 |
dest: "~{{pleroma_user}}/pleroma" |
|
35 |
force: yes |
|
36 |
||
37 |
- name: install pleroma config files |
|
38 |
template: |
|
39 |
src: "{{item}}.j2" |
|
40 |
dest: "~{{pleroma_user}}/pleroma/config/{{item}}" |
|
41 |
owner: "{{pleroma_user}}" |
|
42 |
group: "{{pleroma_user}}" |
|
43 |
mode: "0775" |
|
44 |
become: yes |
|
45 |
become_user: "{{pleroma_user}}" |
|
46 |
with_items: |
|
47 |
- "setup_db.psql" |
|
64 | 48 |
- "prod.secret.exs" |
62
63586cf10d46
Added more config variables to pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
60
diff
changeset
|
49 |
notify: restart pleroma |
60 | 50 |
|
51 |
- name: install pleroma psql |
|
52 |
become: yes |
|
53 |
become_user: "postgres" |
|
54 |
command: "psql -f ~{{pleroma_user}}/pleroma/config/setup_db.psql" |
|
62
63586cf10d46
Added more config variables to pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
60
diff
changeset
|
55 |
notify: restart pleroma |
60 | 56 |
|
57 |
- name: migrate db |
|
58 |
become: yes |
|
59 |
become_user: "{{pleroma_user}}" |
|
60 |
command: "{{item}}" |
|
61 |
args: |
|
62 |
chdir: "~{{pleroma_user}}/pleroma/" |
|
63 |
with_items: |
|
64 |
- "mix local.hex --force" |
|
65 |
- "mix local.rebar --force" |
|
66 |
- "mix deps.get" |
|
67 |
- "mix ecto.migrate" |
|
62
63586cf10d46
Added more config variables to pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
60
diff
changeset
|
68 |
notify: restart pleroma |
60 | 69 |
|
70 |
- name: install pleroma systemd service |
|
71 |
template: |
|
72 |
src: "pleroma.service.j2" |
|
73 |
dest: "/lib/systemd/system/pleroma.service" |
|
74 |
owner: "{{pleroma_user}}" |
|
75 |
group: "{{pleroma_user}}" |
|
76 |
mode: "0770" |
|
77 |
become: yes |
|
78 |
||
79 |
- name: enable pleroma systemd service |
|
80 |
systemd: name="pleroma" enabled="yes" state="started" |
|
81 |
become: yes |