feat: add variables to configure the virtualenv
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Robert Kaussow 2022-02-09 19:29:50 +01:00
parent c26173144c
commit 165c599fa1
Signed by: xoxys
GPG Key ID: 4E692A2EAECC03C0
2 changed files with 10 additions and 8 deletions

View File

@ -1,6 +1,9 @@
---
matrix_version: "1.26.0"
matrix_virtualenv_command: /usr/bin/python3 -m venv
matrix_virtualenv: "{{ matrix_base_dir }}/env"
matrix_user: matrix
matrix_user_home: "/home/{{ matrix_user }}"
matrix_group: "{{ matrix_user }}"
@ -18,7 +21,6 @@ matrix_packages:
- tcl-devel
- tk-devel
- redhat-rpm-config
- python36-devel
- libffi-devel
- openssl-devel

View File

@ -18,8 +18,8 @@
- name: Upgrade python dependencies
pip:
name: "{{ item }}"
virtualenv: "{{ matrix_base_dir }}/env"
virtualenv_command: /usr/bin/python3 -m venv
virtualenv: "{{ matrix_virtualenv }}"
virtualenv_command: "{{ /usr/bin/python3 -m venv }}"
extra_args: --upgrade
loop:
- pip
@ -29,15 +29,15 @@
pip:
name: matrix-synapse[all]
version: "{{ matrix_version }}"
virtualenv: "{{ matrix_base_dir }}/env"
virtualenv_command: /usr/bin/python3 -m venv
virtualenv: "{{ matrix_virtualenv }}"
virtualenv_command: "{{ /usr/bin/python3 -m venv }}"
notify: __matrix_restart
- name: Install ldap3 auth provider
pip:
name: "matrix-synapse-ldap3"
virtualenv: "{{ matrix_base_dir }}/env"
virtualenv_command: /usr/bin/python3 -m venv
virtualenv: "{{ matrix_virtualenv }}"
virtualenv_command: "{{ /usr/bin/python3 -m venv }}"
when: matrix_ldap_auth_enabled | bool
- name: Deploy existing signing key
@ -48,7 +48,7 @@
when: matrix_signing_key is defined
- name: Create new signing key if not provided
shell: '{{ matrix_base_dir }}/env/bin/python -c "from signedjson import key; file = open(''{{ matrix_conf_dir }}/{{ matrix_server_url }}.signing.key'',''w''); key.write_signing_keys(file, [key.generate_signing_key(''first'')]); file.close()"'
shell: '{{ matrix_virtualenv }}/bin/python -c "from signedjson import key; file = open(''{{ matrix_conf_dir }}/{{ matrix_server_url }}.signing.key'',''w''); key.write_signing_keys(file, [key.generate_signing_key(''first'')]); file.close()"'
args:
creates: "{{ matrix_conf_dir }}/{{ matrix_server_url }}.signing.key"
notify: __matrix_restart