Update to 2023-06-16 18:00

This commit is contained in:
Daniel Berteaud
2023-06-16 18:00:09 +02:00
parent 6769775cfc
commit 38b4a31d19
24 changed files with 173 additions and 76 deletions

View File

@@ -80,9 +80,20 @@
when: seafile_db_pass is not defined
tags: seafile
- name: Generate a JWT private key
block:
- import_tasks: ../includes/get_rand_pass.yml
vars:
- pass_file: "{{ seafile_root_dir }}/meta/ansible_jwt_key"
- size: 45
- complex: False
- set_fact: seafile_jwt_key={{ rand_pass }}
when: seafile_jwt_key is not defined
tags: seafile
- name: Set seafile ports
set_fact:
seafile_ports: "{{ [ seafile_seafile_port ] + [ seafile_seahub_port ] }}"
seafile_ports: "{{ [ seafile_seafile_port ] + [ seafile_notification_port ] + [ seafile_seahub_port ] }}"
tags: seafile
- name: Add webdav port

View File

@@ -18,28 +18,53 @@
register: seafile_py2
tags: seafile
- name: Clear the venv as we migrate to py3
- name: Check if venv uses py 3.6
stat: path={{ seafile_root_dir }}/bin/python3.6
register: seafile_py36
tags: seafile
- name: Clear the venv as we migrate to python 3.9
file: path={{ seafile_root_dir }}/{{ item }} state=absent
loop:
- lib
- lib64
- bin
- include
when: seafile_py2.stat.exists
when: seafile_py2.stat.exists or seafile_py36.stat.exists
tags: seafile
- name: Install or update python modules in the virtualenv
pip:
state: "{{ (seafile_install_mode == 'upgrade') | ternary('latest', 'present') }}"
virtualenv: "{{ seafile_root_dir }}"
virtualenv_command: /usr/bin/virtualenv-3
virtualenv_python: /usr/bin/python3
virtualenv_command: /bin/python3.9 -m venv
name: "{{ seafile_python_libs }}"
notify:
- restart seafile
- restart seahub
tags: seafile
- name: Installer version specific python modules
pip:
virtualenv: "{{ seafile_root_dir }}"
virtualenv_command: /bin/python3.9 -m venv
name:
- future==0.18.*
- mysqlclient==2.1.*
- pillow==9.3.*
- captcha==0.4
- django_simple_captcha==0.5.*
- djangosaml2==1.5.*
- pysaml2==7.2.*
- pycryptodome==3.16.*
- cffi==1.15.1
- SQLAlchemy==1.4.3
- chardet
notify:
- restart seafile
- restart seahub
tags: seafile
- name: Install Seafile pro license
copy: content={{ seafile_license }} dest={{ seafile_root_dir }}/seafile-license.txt
when:
@@ -96,6 +121,16 @@
register: seafile_avatar
tags: seafile
- name: Check if python2.7 lib dir exists
stat: path={{ seafile_root_dir }}/seafile-server/seafile/lib64/python2.7
register: seafile_py27_lib
tags: seafile
- name: Link py27 lib dir to py3 lib dir
file: src={{ seafile_root_dir }}/seafile-server/seafile/lib64/python2.7 dest={{ seafile_root_dir }}/seafile-server/seafile/lib64/python3 state=link force=True
when: seafile_py27_lib.stat.exists
tags: seafile
- name: Remove default avatar directory
file: path={{ seafile_root_dir }}/seafile-server/seahub/media/avatars state=absent
when: seafile_avatar.stat.isdir is defined and seafile_avatar.stat.isdir
@@ -269,7 +304,7 @@
copy:
content: |
#!/bin/bash -e
export PYTHONPATH={{ seafile_root_dir }}/lib/python3.6/site-packages/
export PYTHONPATH={{ seafile_root_dir }}/lib/python3.9/site-packages/
{{ seafile_root_dir }}/bin/python3 $@
dest: /usr/local/bin/seafpy
mode: 0755