Move Matrix to a dedi psql

This commit is contained in:
Salt 2020-08-01 20:59:55 -05:00
parent 3ad23b28cd
commit 25a5270e33
4 changed files with 37 additions and 2 deletions

View File

@ -83,6 +83,13 @@ matrix_server_name: "9iron.club"
matrix_url: "matrix.9iron.club"
matrix_enable_registration: "true"
matrix_admin_contact: "mailto:rehashedsalt@cock.li"
matrix_db_password: !vault |
$ANSIBLE_VAULT;1.1;AES256
64663061333130386634323631353435376330636334623334663365633361336563393634333061
6531393839336532376465356132646337663339333431340a383030373166653835386239643365
31356462653634323162343164633130366664323034373330613764663635326534303935303230
6233636463636134640a386436316462643434343739333232613264303635323261616634326562
63316265366238383038653034326661633163346462396663346563666134393232
# Nextcloud
nextcloud_mysql_password: !vault |
$ANSIBLE_VAULT;1.1;AES256

View File

@ -19,6 +19,8 @@
- role: backups
tags: [ backups ]
- role: matrix
vars:
matrix_db_hostname: "{{ hostvars['psql1.9iron.club']['ansible_default_ipv4']['address'] }}"
tags: [ fedi, matrix ]
- role: pleroma
vars:

View File

@ -19,6 +19,24 @@
apt:
name:
- "matrix-synapse-py3"
- name: Set up PostgreSQL
block:
- name: Create DB user
postgresql_user:
name: matrix
password: "{{ matrix_db_password }}"
login_host: "{{ matrix_db_hostname }}"
login_user: "{{ psql_ansible_user }}"
login_password: "{{ psql_ansible_password }}"
- name: Create DB
postgresql_db:
name: matrix
owner: matrix
lc_collate: C
lc_ctype: C
login_host: "{{ matrix_db_hostname }}"
login_user: "{{ psql_ansible_user }}"
login_password: "{{ psql_ansible_password }}"
- name: Set up Apache
block:
- name: Template out config

View File

@ -41,9 +41,17 @@ retention:
## Database ##
database:
name: sqlite3
name: psycopg2
args:
database: /var/lib/matrix-synapse/homeserver.db
user: matrix
password: '{{ matrix_db_password }}'
database: matrix
host: '{{ matrix_db_hostname }}'
cp_min: 5
cp_max: 10
# name: sqlite3
# args:
# database: /var/lib/matrix-synapse/homeserver.db
## Logging ##
log_config: "/etc/matrix-synapse/log.yaml"