Ansible roles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

115 lines
2.7 KiB

---
- name: Install system dependencies
yum:
name:
- libtiff-devel
- libjpeg-devel
- libzip-devel
- freetype-devel
- lcms2-devel
- libwebp-devel
- tcl-devel
- tk-devel
- libffi-devel
- openssl-devel
- libxslt-devel
- gcc
- gcc-c++
- libtool
- autoconf
- automake
- postgresql13
- postgresql-devel
- libpqxx-devel
- jemalloc
- python3-virtualenv
- python3-pip
- python-psycopg2
- python-setuptools
tags: matrix
- name: Wipe pip cache
file: path=/root/.cache/pip state=absent
when: synapse_old_venv.stat.exists
tags: matrix
- name: Install or update dependencies in the virtual env
pip:
state: latest
virtualenv: "{{ synapse_root_dir }}/venv"
virtualenv_command: /usr/bin/virtualenv-3
virtualenv_python: /usr/bin/python3
name:
- bleach
- matrix-synapse-ldap3
- psycopg2
- txacme
- Jinja2
- lxml
- pysaml2
- mock
- six
- authlib==0.14.3 # 0.15 breaks OIDC auth
notify: restart synapse
tags: matrix
- name: Install or update synapse in a virtualenv
pip:
virtualenv: "{{ synapse_root_dir }}/venv"
virtualenv_command: /usr/bin/virtualenv-3
virtualenv_python: /usr/bin/python3
name:
- matrix-synapse
version: "{{ synapse_version }}"
notify: restart synapse
tags: matrix
- name: Install the service unit file
template: src=matrix-synapse.service.j2 dest=/etc/systemd/system/matrix-synapse.service
register: synapse_service_unit
notify: restart synapse
tags: matrix
- name: Reload systemd
systemd: daemon_reload=True
when: synapse_service_unit.changed
tags: matrix
- name: Install REST auth module
get_url:
url: https://raw.githubusercontent.com/ma1uta/matrix-synapse-rest-password-provider/master/rest_auth_provider.py
dest: "{{ synapse_root_dir }}/venv/lib/python3.6/site-packages/"
tags: matrix
- name: Create the PostgreSQL role
postgresql_user:
db: postgres
name: "{{ synapse_pg_db_user }}"
password: "{{ synapse_pg_db_pass }}"
login_host: "{{ synapse_pg_db_server }}"
login_user: sqladmin
login_password: "{{ pg_admin_pass }}"
tags: matrix
- name: Create the PostgreSQL database
postgresql_db:
name: "{{ synapse_pg_db_name }}"
encoding: UTF-8
lc_collate: C
lc_ctype: C
template: template0
owner: "{{ synapse_pg_db_user }}"
login_host: "{{ synapse_pg_db_server }}"
login_user: sqladmin
login_password: "{{ pg_admin_pass }}"
tags: matrix
- name: Deploy backup scripts
template: src={{ item }}-backup.sh.j2 dest=/etc/backup/{{ item }}.d/matrix_synapse.sh mode=750
loop:
- pre
- post
tags: matrix