2019-02-12 02:16:03 +00:00
|
|
|
---
|
2019-02-15 02:24:30 +00:00
|
|
|
- hosts: all
|
|
|
|
become: true
|
|
|
|
vars:
|
|
|
|
dbname: synapse
|
|
|
|
dbuser: synapse_user
|
|
|
|
dbpw: synapse_password
|
2019-04-08 19:34:31 +00:00
|
|
|
tasks:
|
2019-04-08 21:12:17 +00:00
|
|
|
- name: Flush handlers
|
|
|
|
meta: flush_handlers
|
|
|
|
|
2019-04-08 19:34:31 +00:00
|
|
|
- name: Check if the api returns the correct version
|
|
|
|
uri:
|
|
|
|
url: "http://localhost:8008/_matrix/federation/v1/version"
|
|
|
|
return_content: true
|
|
|
|
register: api_version
|
2019-04-08 21:12:17 +00:00
|
|
|
until: api_version.status == 200
|
|
|
|
retries: 10
|
|
|
|
delay: 2
|
2019-04-08 19:34:31 +00:00
|
|
|
|
|
|
|
- name: Check returned api version
|
2019-04-08 22:31:18 +00:00
|
|
|
fail:
|
|
|
|
msg: "Return value {{ api_version }} is not as expected {{ matrix_synapse_version }}"
|
2019-04-08 19:34:31 +00:00
|
|
|
when: matrix_synapse_version != "v"~(api_version.content | from_json).server.version
|
2019-02-15 02:24:30 +00:00
|
|
|
roles:
|
2019-02-16 10:25:57 +00:00
|
|
|
- role: geerlingguy.pip
|
2019-10-05 18:49:37 +00:00
|
|
|
pip_package: python3-pip
|
|
|
|
pip_install_packages:
|
|
|
|
- name: psycopg2-binary
|
2019-02-15 02:24:30 +00:00
|
|
|
- role: geerlingguy.postgresql
|
|
|
|
postgresql_databases:
|
2019-02-17 23:27:45 +00:00
|
|
|
- name: "{{ dbname }}"
|
2019-02-15 02:24:30 +00:00
|
|
|
postgresql_users:
|
2019-02-17 23:27:45 +00:00
|
|
|
- name: "{{ dbuser }}"
|
2019-02-15 02:24:30 +00:00
|
|
|
password: "{{ dbpw }}"
|
2019-02-16 10:25:57 +00:00
|
|
|
postgresql_global_config_options:
|
2019-02-21 22:19:47 +00:00
|
|
|
- option: listen_addresses
|
2019-02-16 10:25:57 +00:00
|
|
|
value: "*"
|
2019-10-05 18:46:47 +00:00
|
|
|
- role: synapse
|
2019-02-15 02:24:30 +00:00
|
|
|
matrix_server_name: localhost
|
|
|
|
matrix_synapse_report_stats: false
|
|
|
|
matrix_synapse_pg_host: localhost
|
|
|
|
matrix_synapse_pg_user: "{{ dbuser }}"
|
|
|
|
matrix_synapse_pg_pass: "{{ dbpw }}"
|
|
|
|
matrix_synapse_pg_db: "{{ dbname }}"
|
2019-02-17 21:40:11 +00:00
|
|
|
matrix_synapse_extra_config:
|
|
|
|
no_tls: true
|