diff --git a/group_vars/all/vars.yml b/group_vars/all/vars.yml new file mode 100644 index 0000000..fcb985e --- /dev/null +++ b/group_vars/all/vars.yml @@ -0,0 +1,3 @@ + synapse_dbname: synapse + synapse_dbuser: synapse_db + synapse_dbpw: synapse_db \ No newline at end of file diff --git a/postgres.yml b/postgres.yml new file mode 100644 index 0000000..5c285aa --- /dev/null +++ b/postgres.yml @@ -0,0 +1,21 @@ +- hosts: synapse + tasks: + - pip: + name: psycopg2 + state: present + roles: + - role: geerlingguy.postgresql + postgresql_databases: + - name: "{{ synapse_dbname }}" + postgresql_users: + - name: "{{ synapse_dbuser }}" + password: "{{ synapse_dbpw }}" + postgresql_global_config_options: + - option: listen_addresses + value: "*" + + + # username: "postgres", + # password: "postgres", + # database: "imago_dev", + # hostname: "localhost", \ No newline at end of file diff --git a/setup.yml b/setup.yml index e62e9a0..38cc57d 100644 --- a/setup.yml +++ b/setup.yml @@ -1,7 +1,6 @@ --- - hosts: - - postgresql - synapse roles: diff --git a/synapse.yml b/synapse.yml index 4f8db83..f0cf439 100644 --- a/synapse.yml +++ b/synapse.yml @@ -9,9 +9,7 @@ matrix_synapse_deployment_method: pip matrix_synapse_baseurl: "https://{{ matrix_server_name }}" matrix_synapse_signing_key_path: "{{ matrix_synapse_base_path }}/tls/{{ matrix_server_name }}.signing.key" - # Test variables, doesn't seem to be working. Maybe a hostname problem - matrix_synapse_tls_cert: "" - matrix_synapse_tls_key: "" + matrix_synapse_pg_host: localhost matrix_synapse_pg_user: "{{ synapse_dbuser }}" @@ -20,7 +18,10 @@ matrix_synapse_report_stats: false # Report stats to matrix.org? matrix_synapse_extra_config: # no_tls:true disables port 8448 - no_tls: false + no_tls: true + # If false: + # matrix_synapse_tls_cert: "" + # matrix_synapse_tls_key: "" # pre_tasks: # tasks: