matrix-synapse/tasks/main.yaml
author Luke Hoersten <luke@hoersten.org>
Mon, 08 Jun 2020 16:30:37 -0500
changeset 36 a8627367c7be
child 37 2ef98b7b40d4
permissions -rw-r--r--
Add matrix synapse server role.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
36
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
---
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
- name: install matrix synapse
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
  become: yes
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
  apt: name="matrix-synapse"
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
- name: configure matrix synapse
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
  become: yes
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
  template:
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    src: "homeserver.yaml.j2"
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    dest: "/etc/matrix-synapse/homeserver.yaml"
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
  notify: restart matrix synapse service
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
- name: configure matrix synapse server name
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
  become: yes
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
  template:
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
    src: "server_name.yaml.j2"
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
    dest: "/etc/matrix-synapse/conf.d/server_name.yaml"
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
  notify: restart matrix synapse service
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
- name: ensure matrix synapse is started
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
  become: yes
a8627367c7be Add matrix synapse server role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
  systemd: name="matrix-synapse.service" enabled="yes" state="started"