diff --git a/roles/seafile/tasks/install.yml b/roles/seafile/tasks/install.yml index d5685c2..cbb01ba 100644 --- a/roles/seafile/tasks/install.yml +++ b/roles/seafile/tasks/install.yml @@ -37,7 +37,19 @@ pip: virtualenv: "{{ seafile_root_dir }}" virtualenv_command: /bin/python3.9 -m venv - name: "{{ seafile_python_libs[seafile_edition] }}" + name: "{{ seafile_python_libs.community }}" + when: seafile_license is not defined + notify: + - restart seafile + - restart seahub + tags: seafile + +- name: Install or update python modules in the virtualenv + pip: + virtualenv: "{{ seafile_root_dir }}" + virtualenv_command: /bin/python3.9 -m venv + name: "{{ seafile_python_libs.pro }}" + when: seafile_license is defined notify: - restart seafile - restart seahub diff --git a/roles/seafile/templates/ccnet.conf.j2 b/roles/seafile/templates/ccnet.conf.j2 index 37fd693..86b5a0d 100644 --- a/roles/seafile/templates/ccnet.conf.j2 +++ b/roles/seafile/templates/ccnet.conf.j2 @@ -15,7 +15,7 @@ PASSWD = {{ seafile_db_pass }} DB = {{ seafile_db_ccnet }} CONNECTION_CHARSET = utf8 -{% if seafile_edition == 'pro' and seafile_ldap_auth is defined and seafile_ldap_auth %} +{% if seafile_version is version('11', '<') and seafile_ldap_auth is defined and seafile_ldap_auth %} [LDAP] HOST = {{ seafile_ldap_uri }} BASE = {{ seafile_ldap_base }} @@ -26,7 +26,7 @@ PASSWORD = {{ seafile_ldap_bind_pass }} LOGIN_ATTR = {{ seafile_ldap_login_attr }} FILTER = {{ seafile_ldap_filter }} -{% if seafile_edition == 'pro' %} +{% if seafile_license is defined %} [LDAP_SYNC] ENABLE_USER_SYNC = true ENABLE_GROUP_SYNC = {{ seafile_ldap_group_filter is defined | ternary('true','false') }} diff --git a/roles/seafile/templates/seafevents.conf.j2 b/roles/seafile/templates/seafevents.conf.j2 index d139ef2..e5d9f44 100644 --- a/roles/seafile/templates/seafevents.conf.j2 +++ b/roles/seafile/templates/seafevents.conf.j2 @@ -16,7 +16,7 @@ enabled = true enabled = true interval = 30m -{% if seafile_edition == 'pro' %} +{% if seafile_license is defined %} [AUDIT] enabled = true diff --git a/roles/seafile/templates/seahub_settings.py.j2 b/roles/seafile/templates/seahub_settings.py.j2 index be355b8..0fd2f26 100644 --- a/roles/seafile/templates/seahub_settings.py.j2 +++ b/roles/seafile/templates/seahub_settings.py.j2 @@ -173,7 +173,7 @@ VIRUS_SCAN_NOTIFY_LIST = ['{{ system_admin_email }}'] {% endif %} {% endif %} -{% if seafile_edition == 'community' and seafile_ldap_auth is defined and seafile_ldap_auth %} +{% if seafile_version is version('11', '>=') and seafile_ldap_auth is defined and seafile_ldap_auth %} ENABLE_LDAP = True LDAP_SERVER_URL = '{{ seafile_ldap_uri }}' LDAP_BASE_DN = '{{ seafile_ldap_base }}'