[fix] postgresql invocation for synapse
This commit is contained in:
parent
e49223e043
commit
9a01b674b3
10 changed files with 32 additions and 42 deletions
5
ansible/roles/postgresql-for-synapse/defaults/main.json
Normal file
5
ansible/roles/postgresql-for-synapse/defaults/main.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"var_postgresql_for_synapse_username": "synapse_user",
|
||||
"var_postgresql_for_synapse_password": "synapse_password",
|
||||
"var_postgresql_for_synapse_schema": "synapse"
|
||||
}
|
|
@ -15,8 +15,8 @@
|
|||
"become_user": "postgres",
|
||||
"community.postgresql.postgresql_user": {
|
||||
"state": "present",
|
||||
"name": "{{var_postgresql_server_for_synapse_username}}",
|
||||
"password": "{{var_postgresql_server_for_synapse_password}}"
|
||||
"name": "{{var_postgresql_for_synapse_username}}",
|
||||
"password": "{{var_postgresql_for_synapse_password}}"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -26,8 +26,8 @@
|
|||
"community.postgresql.postgresql_db": {
|
||||
"state": "present",
|
||||
"template": "template0",
|
||||
"name": "{{var_postgresql_server_for_synapse_schema}}",
|
||||
"owner": "{{var_postgresql_server_for_synapse_username}}",
|
||||
"name": "{{var_postgresql_for_synapse_schema}}",
|
||||
"owner": "{{var_postgresql_for_synapse_username}}",
|
||||
"encoding": "UTF-8",
|
||||
"lc_collate": "C",
|
||||
"lc_ctype": "C"
|
||||
|
@ -39,9 +39,9 @@
|
|||
"become_user": "postgres",
|
||||
"community.postgresql.postgresql_privs": {
|
||||
"state": "present",
|
||||
"db": "{{var_postgresql_server_for_synapse_schema}}",
|
||||
"db": "{{var_postgresql_for_synapse_schema}}",
|
||||
"objs": "ALL_IN_SCHEMA",
|
||||
"roles": "{{var_postgresql_server_for_synapse_username}}",
|
||||
"roles": "{{var_postgresql_for_synapse_username}}",
|
||||
"privs": "ALL",
|
||||
"grant_option": true
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
{
|
||||
"var_postgresql_client_for_synapse_host": "localhost",
|
||||
"var_postgresql_client_for_synapse_port": "5432",
|
||||
"var_postgresql_client_for_synapse_username": "synapse_user",
|
||||
"var_postgresql_client_for_synapse_password": "synapse_password",
|
||||
"var_postgresql_client_for_synapse_schema": "synapse"
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
## Verweise
|
||||
|
||||
- [Synapse-Dokumentation](https://matrix-org.github.io/synapse/latest/postgres.html#using-postgres)
|
|
@ -1,10 +0,0 @@
|
|||
[
|
||||
{
|
||||
"name": "emplace configuration file",
|
||||
"become": true,
|
||||
"ansible.builtin.template": {
|
||||
"src": "database.yaml.j2",
|
||||
"dest": "/etc/matrix-synapse/conf.d/database.yaml"
|
||||
}
|
||||
}
|
||||
]
|
|
@ -1,10 +0,0 @@
|
|||
database:
|
||||
name: psycopg2
|
||||
args:
|
||||
host: {{var_postgresql_client_for_synapse_host}}
|
||||
port: {{var_postgresql_client_for_synapse_port}}
|
||||
database: "{{var_postgresql_client_for_synapse_schema}}"
|
||||
user: "{{var_postgresql_client_for_synapse_username}}"
|
||||
password: "{{var_postgresql_client_for_synapse_password}}"
|
||||
cp_min: 5
|
||||
cp_max: 10
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"var_postgresql_server_for_synapse_username": "synapse_user",
|
||||
"var_postgresql_server_for_synapse_password": "synapse_password",
|
||||
"var_postgresql_server_for_synapse_schema": "synapse"
|
||||
}
|
|
@ -1,6 +1,12 @@
|
|||
{
|
||||
"var_synapse_scheme": "https",
|
||||
"var_synapse_domain": "matrix.example.org",
|
||||
"var_synaspe_database_kind": "postgresql",
|
||||
"var_synaspe_database_postgresql_host": "localhost",
|
||||
"var_synaspe_database_postgresql_port": "5432",
|
||||
"var_synaspe_database_postgresql_username": "synapse_user",
|
||||
"var_synaspe_database_postgresql_password": "synapse_password",
|
||||
"var_synaspe_database_postgresql_schema": "synapse"
|
||||
"var_synapse_element_url": "https://element.example.org",
|
||||
"var_synapse_title": "Example | Matrix",
|
||||
"var_synapse_federation_whitelist": "[]",
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
## Beschreibung
|
||||
|
||||
Zur Einrichtung des [matrix.org](https://matrix.org/)-Servers Synapse
|
||||
|
||||
|
||||
## Verweise
|
||||
|
||||
- [matrix.org](https://matrix.org/)
|
||||
- [ubuntuusers-Wiki-Eintrag](https://wiki.ubuntuusers.de/Matrix_synapse/)
|
||||
- [GitHub-Repository](https://github.com/matrix-org/synapse)
|
||||
- [Configuration Manual](https://matrix-org.github.io/synapse/latest/usage/configuration/config_documentation.html)
|
||||
- [Dokumentation | PostgreSQL](https://matrix-org.github.io/synapse/latest/postgres.html#using-postgres)
|
||||
|
|
|
@ -1,3 +1,16 @@
|
|||
{% if var_synaspe_database_kind == 'postgresql' %}
|
||||
database:
|
||||
name: psycopg2
|
||||
args:
|
||||
host: {{var_synapse_database_postgresql_host}}
|
||||
port: {{var_synapse_database_postgresql_port}}
|
||||
database: "{{var_synapse_database_postgresql_schema}}"
|
||||
user: "{{var_synapse_database_postgresql_username}}"
|
||||
password: "{{var_synapse_database_postgresql_password}}"
|
||||
cp_min: 5
|
||||
cp_max: 10
|
||||
{% endif %}
|
||||
|
||||
no_tls: True
|
||||
|
||||
tls_fingerprints: []
|
||||
|
|
Loading…
Add table
Reference in a new issue