ansible/roles/synapse/tasks/main.yml

56 lines
1.3 KiB
YAML
Raw Normal View History

2021-07-27 03:34:14 +02:00
---
- name: Setup postgres
include_role:
name: postgre
vars:
postgres_users:
- name: synapse_user
password: some password for now
databases:
- name: synapse
owner: synapse_user
local: C
template: template0
2021-07-27 23:35:04 +02:00
- name: Install apt utils
2021-07-27 03:34:14 +02:00
apt:
name:
- apt-transport-https
2021-07-27 23:35:04 +02:00
- gnupg2
- debconf
- debconf-utils
2021-07-27 03:34:14 +02:00
state: latest
update_cache: true
register: apt_result
retries: 3
until: apt_result is succeeded
- name: Install the pgp key for the synapse repo
copy:
src: matrix-org-archive-keyring.gpg
dest: /usr/share/keyrings/matrix-org-archive-keyring.gpg
mode: 0644
- name: Add synapse repo to source list
ansible.builtin.apt_repository:
repo: "deb [signed-by=/usr/share/keyrings/matrix-org-archive-keyring.gpg] https://packages.matrix.org/debian/ {{ ansible_facts['lsb']['codename'] }} main"
state: present
2021-07-27 23:35:04 +02:00
- name: Configure debian question for hostname
debconf:
name: matrix-synapse-py3
question: matrix-synapse/server-name
value: "{{ matrix_server_name }}"
vtype: string
2021-07-27 03:34:14 +02:00
- name: Install synapse
apt:
name:
- matrix-synapse-py3
state: latest
update_cache: true
register: apt_result
retries: 3
until: apt_result is succeeded