2018-07-30 14:56:33 +00:00
|
|
|
---
|
|
|
|
- name: create user
|
|
|
|
user:
|
|
|
|
name: synapse
|
|
|
|
state: present
|
2018-08-17 13:40:32 +00:00
|
|
|
tags:
|
|
|
|
- pre_install
|
2018-07-30 14:56:33 +00:00
|
|
|
|
|
|
|
- name: create directory
|
|
|
|
file:
|
|
|
|
name: /opt/synapse
|
|
|
|
state: directory
|
|
|
|
owner: synapse
|
|
|
|
group: synapse
|
2018-08-17 13:40:32 +00:00
|
|
|
tags:
|
|
|
|
- pre_install
|
2018-07-30 14:56:33 +00:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
apt:
|
2018-12-02 22:10:29 +00:00
|
|
|
name:
|
|
|
|
- build-essential
|
|
|
|
- python2.7-dev
|
|
|
|
- libffi-dev
|
|
|
|
- python-pip
|
|
|
|
- python-setuptools
|
|
|
|
- sqlite3
|
|
|
|
- libssl-dev
|
|
|
|
- python-virtualenv
|
|
|
|
- libjpeg-dev
|
|
|
|
- libxslt1-dev
|
|
|
|
- git
|
|
|
|
- libpq-dev
|
2018-07-30 14:56:33 +00:00
|
|
|
state: present
|
2018-12-02 22:10:29 +00:00
|
|
|
cache_valid_time: 1800
|
|
|
|
tags:
|
2018-08-17 13:40:32 +00:00
|
|
|
- pre_install
|
2018-07-30 14:56:33 +00:00
|
|
|
|
|
|
|
- name: Create virtualenv
|
|
|
|
pip:
|
|
|
|
name:
|
|
|
|
- pip
|
|
|
|
- setuptools
|
|
|
|
- lxml
|
|
|
|
- psycopg2-binary
|
|
|
|
- mock
|
|
|
|
virtualenv: /opt/synapse/env
|
|
|
|
virtualenv_python: python2.7
|
|
|
|
extra_args: --upgrade
|
|
|
|
become: true
|
|
|
|
become_user: synapse
|
2018-08-17 13:40:32 +00:00
|
|
|
tags:
|
|
|
|
- pre_install
|
2018-07-30 14:56:33 +00:00
|
|
|
|
|
|
|
- name: Clone synapse
|
|
|
|
git:
|
|
|
|
repo: https://github.com/matrix-org/synapse
|
|
|
|
dest: /opt/synapse/synapse
|
|
|
|
accept_hostkey: yes
|
|
|
|
version: "{{ matrix_synapse_version }}"
|
|
|
|
become_user: synapse
|
|
|
|
become: true
|
|
|
|
register: clone_synapse
|
2018-08-17 13:40:32 +00:00
|
|
|
tags:
|
|
|
|
- pre_install
|
2018-07-30 14:56:33 +00:00
|
|
|
|
|
|
|
- name: Install Synapse
|
|
|
|
pip:
|
|
|
|
name: /opt/synapse/synapse
|
|
|
|
virtualenv: /opt/synapse/env
|
|
|
|
virtualenv_python: python2.7
|
|
|
|
become_user: synapse
|
|
|
|
become: true
|
|
|
|
when: clone_synapse.changed
|
|
|
|
tags:
|
|
|
|
- skip_ansible_lint # skip when clause
|
2018-08-17 13:40:32 +00:00
|
|
|
- pre_install
|
|
|
|
|