matrix-synapse/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Tue, 09 Jun 2020 14:39:54 -0500
changeset 38 b4e705f4cda4
parent 37 2ef98b7b40d4
child 39 90b1b7c4be70
permissions -rw-r--r--
Suppress warning.

---

- name: add debian backports keys
  become: yes
  apt_key:
    keyserver: "keyserver.ubuntu.com "
    id: "{{item}}"
  loop:
    - "04EE7237B7D453EC"
    - "648ACFD622F3D138"

- name: add matrix repo
  become: yes
  apt_repository: repo="deb http://deb.debian.org/debian buster-backports main"

- name: install matrix synapse
  become: yes
  apt:
    name: "matrix-synapse"
    state: "latest"
    default_release: "buster-backports"
  notify: restart matrix synapse service

- name: configure matrix synapse
  become: yes
  template:
    src: "homeserver.yaml.j2"
    dest: "/etc/matrix-synapse/homeserver.yaml"
  notify: restart matrix synapse service

- name: configure matrix synapse server name
  become: yes
  template:
    src: "server_name.yaml.j2"
    dest: "/etc/matrix-synapse/conf.d/server_name.yaml"
  notify: restart matrix synapse service

- name: ensure matrix synapse is started
  become: yes
  systemd: name="matrix-synapse.service" enabled="yes" state="started"