|
|
@ -10,7 +10,6 @@ |
|
|
|
- openldap-devel |
|
|
|
- openldap-devel |
|
|
|
- libjpeg-turbo-devel |
|
|
|
- libjpeg-turbo-devel |
|
|
|
- libpng-devel |
|
|
|
- libpng-devel |
|
|
|
- mysql-devel |
|
|
|
|
|
|
|
- libexif |
|
|
|
- libexif |
|
|
|
- ghostscript |
|
|
|
- ghostscript |
|
|
|
- gnupg1 |
|
|
|
- gnupg1 |
|
|
@ -28,12 +27,31 @@ |
|
|
|
- python-setuptools |
|
|
|
- python-setuptools |
|
|
|
tags: mayan |
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install MySQL support |
|
|
|
|
|
|
|
yum: |
|
|
|
|
|
|
|
name: |
|
|
|
|
|
|
|
- mysql-devel |
|
|
|
|
|
|
|
- MySQL-python |
|
|
|
|
|
|
|
when: mayan_db_engine == 'mysql' |
|
|
|
|
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
# WHen using upstream MariaDB repo, we have to install MariaDB-shared |
|
|
|
# WHen using upstream MariaDB repo, we have to install MariaDB-shared |
|
|
|
- name: Install MariaDB shared libs |
|
|
|
- name: Install MariaDB shared libs |
|
|
|
yum: |
|
|
|
yum: |
|
|
|
name: |
|
|
|
name: |
|
|
|
- MariaDB-shared |
|
|
|
- MariaDB-shared |
|
|
|
when: mysql_mariadb_version is defined and mysql_mariadb_version != 'default' |
|
|
|
when: |
|
|
|
|
|
|
|
- mayan_db_engine == 'mysql' |
|
|
|
|
|
|
|
- mysql_mariadb_version is defined and mysql_mariadb_version != 'default' |
|
|
|
|
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Install PostgreSQL support |
|
|
|
|
|
|
|
yum: |
|
|
|
|
|
|
|
name: |
|
|
|
|
|
|
|
- postgresql-devel |
|
|
|
|
|
|
|
- postgresql13 |
|
|
|
|
|
|
|
- python-psocopg2 |
|
|
|
|
|
|
|
when: mayan_db_engine == 'postgresql' |
|
|
|
tags: mayan |
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
- name: Wipe the venv on upgrades |
|
|
|
- name: Wipe the venv on upgrades |
|
|
@ -50,9 +68,9 @@ |
|
|
|
name: |
|
|
|
name: |
|
|
|
- pip |
|
|
|
- pip |
|
|
|
- redis |
|
|
|
- redis |
|
|
|
- mysql |
|
|
|
|
|
|
|
- python-ldap |
|
|
|
- python-ldap |
|
|
|
- django_auth_ldap |
|
|
|
- django_auth_ldap |
|
|
|
|
|
|
|
- "{{ (mayan_db_engine == 'mysql') | ternary('mysql','psycopg2') }}" |
|
|
|
state: "{{ (mayan_install_mode == 'none') | ternary('present', 'latest') }}" |
|
|
|
state: "{{ (mayan_install_mode == 'none') | ternary('present', 'latest') }}" |
|
|
|
virtualenv: "{{ mayan_root_dir }}/venv" |
|
|
|
virtualenv: "{{ mayan_root_dir }}/venv" |
|
|
|
virtualenv_command: /usr/bin/virtualenv-3 |
|
|
|
virtualenv_command: /usr/bin/virtualenv-3 |
|
|
@ -68,7 +86,9 @@ |
|
|
|
virtualenv_python: /usr/bin/python3 |
|
|
|
virtualenv_python: /usr/bin/python3 |
|
|
|
tags: mayan |
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
- import_tasks: ../includes/webapps_create_mysql_db.yml |
|
|
|
- when: mayan_db_engine == 'mysql' |
|
|
|
|
|
|
|
block: |
|
|
|
|
|
|
|
- import_tasks: ../includes/webapps_create_mysql_db.yml |
|
|
|
vars: |
|
|
|
vars: |
|
|
|
- db_name: "{{ mayan_db_name }}" |
|
|
|
- db_name: "{{ mayan_db_name }}" |
|
|
|
- db_user: "{{ mayan_db_user }}" |
|
|
|
- db_user: "{{ mayan_db_user }}" |
|
|
@ -76,6 +96,28 @@ |
|
|
|
- db_pass: "{{ mayan_db_pass }}" |
|
|
|
- db_pass: "{{ mayan_db_pass }}" |
|
|
|
tags: mayan |
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- when: mayan_db_engine == 'postgresql' |
|
|
|
|
|
|
|
block: |
|
|
|
|
|
|
|
- name: Create the PostgreSQL role |
|
|
|
|
|
|
|
postgresql_user: |
|
|
|
|
|
|
|
db: postgres |
|
|
|
|
|
|
|
name: "{{ mayan_db_user }}" |
|
|
|
|
|
|
|
password: "{{ mayan_db_pass }}" |
|
|
|
|
|
|
|
login_host: "{{ mayan_db_server }}" |
|
|
|
|
|
|
|
login_user: sqladmin |
|
|
|
|
|
|
|
login_password: "{{ pg_admin_pass }}" |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Create the PostgreSQL database |
|
|
|
|
|
|
|
postgresql_db: |
|
|
|
|
|
|
|
name: "{{ mayan_db_name }}" |
|
|
|
|
|
|
|
encoding: UTF-8 |
|
|
|
|
|
|
|
template: template0 |
|
|
|
|
|
|
|
owner: "{{ mayan_db_user }}" |
|
|
|
|
|
|
|
login_host: "{{ mayan_db_server }}" |
|
|
|
|
|
|
|
login_user: sqladmin |
|
|
|
|
|
|
|
login_password: "{{ pg_admin_pass }}" |
|
|
|
|
|
|
|
tags: mayan |
|
|
|
|
|
|
|
|
|
|
|
- name: Initialize or upgrade database |
|
|
|
- name: Initialize or upgrade database |
|
|
|
command: >- |
|
|
|
command: >- |
|
|
|
{{ mayan_root_dir }}/venv/bin/python |
|
|
|
{{ mayan_root_dir }}/venv/bin/python |
|
|
@ -83,7 +125,7 @@ |
|
|
|
{{ (mayan_install_mode == 'install') | ternary('initialsetup','performupgrade') }} |
|
|
|
{{ (mayan_install_mode == 'install') | ternary('initialsetup','performupgrade') }} |
|
|
|
environment: |
|
|
|
environment: |
|
|
|
- MAYAN_MEDIA_ROOT: "{{ mayan_root_dir }}/data" |
|
|
|
- MAYAN_MEDIA_ROOT: "{{ mayan_root_dir }}/data" |
|
|
|
- MAYAN_DATABASE_ENGINE: django.db.backends.mysql |
|
|
|
- MAYAN_DATABASE_ENGINE: django.db.backends.{{ (mayan_db_engine == 'mysql') | ternary('mysql','postgresql') }} |
|
|
|
- MAYAN_DATABASE_NAME: "{{ mayan_db_name }}" |
|
|
|
- MAYAN_DATABASE_NAME: "{{ mayan_db_name }}" |
|
|
|
- MAYAN_DATABASE_PASSWORD: "{{ mayan_db_pass }}" |
|
|
|
- MAYAN_DATABASE_PASSWORD: "{{ mayan_db_pass }}" |
|
|
|
- MAYAN_DATABASE_USER: "{{ mayan_db_user }}" |
|
|
|
- MAYAN_DATABASE_USER: "{{ mayan_db_user }}" |
|
|
|