pleroma/otp/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 18 Jul 2021 20:17:16 -0500
changeset 164 ae19501f5251
parent 143 7d4a477be685
child 227 2e0366f2dcbe
permissions -rw-r--r--
Updated minecraft to be multi-world and minimized world size.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
60
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
141
0708c9c075fc Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents: 122
diff changeset
     3
- name: add pleroma user
60
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     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
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
101
bce4a3fd8da8 Added dep for ubuntu
Luke Hoersten <luke@hoersten.org>
parents: 98
diff changeset
     7
- name: apt install pleroma dependencies
bce4a3fd8da8 Added dep for ubuntu
Luke Hoersten <luke@hoersten.org>
parents: 98
diff changeset
     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
bce4a3fd8da8 Added dep for ubuntu
Luke Hoersten <luke@hoersten.org>
parents: 98
diff changeset
    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
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    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
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    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