pleroma/otp/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sun, 21 Jul 2024 12:42:43 -0500
changeset 235 f88bb54f63bd
parent 227 2e0366f2dcbe
child 238 bdbc88cb5078
permissions -rw-r--r--
Added scrypted role.
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
227
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 143
diff changeset
    14
- name: install libssl1.1 deb
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 143
diff changeset
    15
  become: yes
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 143
diff changeset
    16
  apt: deb="http://ports.ubuntu.com/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_{{arch}}.deb"
2e0366f2dcbe Tons of updates to fix migration to new server.
Luke Hoersten <luke@hoersten.org>
parents: 143
diff changeset
    17
141
0708c9c075fc Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents: 122
diff changeset
    18
- name: create pleroma config and data directories
60
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
  become: yes
84
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 81
diff changeset
    20
  file:
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 81
diff changeset
    21
    path: "{{item}}"
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 81
diff changeset
    22
    state: "directory"
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 81
diff changeset
    23
    mode: "0755"
143
7d4a477be685 Updated pleroma to 2.2.0 and added new dep.
Luke Hoersten <luke@hoersten.org>
parents: 141
diff changeset
    24
  loop:
84
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 81
diff changeset
    25
    - "{{pleroma_data_dir}}"
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 81
diff changeset
    26
    - "/etc/pleroma"
85
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    27
    - "/opt/pleroma"
60
48a3a65119d5 Initial commit.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
87
4f87097dd651 Got pleroma otp multi-instance working.
Luke Hoersten <luke@hoersten.org>
parents: 85
diff changeset
    29
- name: configure pleroma systemd service
85
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    30
  become: yes
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    31
  copy:
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    32
    src: "[email protected]"
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    33
    dest: "/lib/systemd/system/[email protected]"
dcfd23308c32 Completed pleroma-otp role.
Luke Hoersten <luke@hoersten.org>
parents: 84
diff changeset
    34
  notify: restart pleroma instance
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
- name: check if pleroma release exists
0708c9c075fc Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents: 122
diff changeset
    37
  stat: path="/tmp/release/"
0708c9c075fc Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents: 122
diff changeset
    38
  register: release
84
d0c40727e6ff Added WIP pleroma OTP role.
Luke Hoersten <luke@hoersten.org>
parents: 81
diff changeset
    39
141
0708c9c075fc Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents: 122
diff changeset
    40
- include_tasks: install.yaml
0708c9c075fc Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents: 122
diff changeset
    41
  when: not release.stat.exists
0708c9c075fc Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents: 122
diff changeset
    42
0708c9c075fc Added proper reinstall logic for pleroma.
Luke Hoersten <luke@hoersten.org>
parents: 122
diff changeset
    43
- include_tasks: instance.yaml