pleroma/otp/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Sat, 19 Sep 2020 13:17:07 -0500
changeset 141 0708c9c075fc
parent 122 cde9702e3bff
child 143 7d4a477be685
permissions -rw-r--r--
Added proper reinstall logic for pleroma.

---

- name: add pleroma user
  become: yes
  user: name="pleroma" shell="/bin/false" home="/opt/pleroma" system="yes"

- name: apt install pleroma dependencies
  become: yes
  apt: name="libtinfo5"

- name: create pleroma config and data directories
  become: yes
  file:
    path: "{{item}}"
    state: "directory"
    mode: "0755"
  with_items:
    - "{{pleroma_data_dir}}"
    - "/etc/pleroma"
    - "/opt/pleroma"

- name: configure pleroma systemd service
  become: yes
  copy:
    src: "[email protected]"
    dest: "/lib/systemd/system/[email protected]"
  notify: restart pleroma instance

- name: check if pleroma release exists
  stat: path="/tmp/release/"
  register: release

- include_tasks: install.yaml
  when: not release.stat.exists

- include_tasks: instance.yaml