author | Luke Hoersten <luke@hoersten.org> |
Wed, 05 Sep 2018 16:42:56 -0500 | |
changeset 62 | 63586cf10d46 |
parent 60 | 48a3a65119d5 |
child 63 | 56531bbfd074 |
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: update elixir dep |
|
38 |
become: yes |
|
39 |
become_user: "{{pleroma_user}}" |
|
40 |
lineinfile: |
|
41 |
path: "~{{pleroma_user}}/pleroma/mix.exs" |
|
42 |
regexp: 'elixir: "~> 1.4",$' |
|
43 |
line: 'elixir: "~> 1.7",' |
|
44 |
||
45 |
- name: install pleroma config files |
|
46 |
template: |
|
47 |
src: "{{item}}.j2" |
|
48 |
dest: "~{{pleroma_user}}/pleroma/config/{{item}}" |
|
49 |
owner: "{{pleroma_user}}" |
|
50 |
group: "{{pleroma_user}}" |
|
51 |
mode: "0775" |
|
52 |
become: yes |
|
53 |
become_user: "{{pleroma_user}}" |
|
54 |
with_items: |
|
55 |
- "setup_db.psql" |
|
56 |
- "dev.secret.exs" |
|
62
63586cf10d46
Added more config variables to pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
60
diff
changeset
|
57 |
notify: restart pleroma |
60 | 58 |
|
59 |
- name: install pleroma psql |
|
60 |
become: yes |
|
61 |
become_user: "postgres" |
|
62 |
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
|
63 |
notify: restart pleroma |
60 | 64 |
|
65 |
- name: migrate db |
|
66 |
become: yes |
|
67 |
become_user: "{{pleroma_user}}" |
|
68 |
command: "{{item}}" |
|
69 |
args: |
|
70 |
chdir: "~{{pleroma_user}}/pleroma/" |
|
71 |
with_items: |
|
72 |
- "mix local.hex --force" |
|
73 |
- "mix local.rebar --force" |
|
74 |
- "mix deps.get" |
|
75 |
- "mix ecto.migrate" |
|
62
63586cf10d46
Added more config variables to pleroma.
Luke Hoersten <luke@hoersten.org>
parents:
60
diff
changeset
|
76 |
notify: restart pleroma |
60 | 77 |
|
78 |
- name: install pleroma systemd service |
|
79 |
template: |
|
80 |
src: "pleroma.service.j2" |
|
81 |
dest: "/lib/systemd/system/pleroma.service" |
|
82 |
owner: "{{pleroma_user}}" |
|
83 |
group: "{{pleroma_user}}" |
|
84 |
mode: "0770" |
|
85 |
become: yes |
|
86 |
||
87 |
- name: enable pleroma systemd service |
|
88 |
systemd: name="pleroma" enabled="yes" state="started" |
|
89 |
become: yes |