Update to 2021-07-12 13:00

master
Daniel Berteaud 3 years ago
parent a05088e9cb
commit 1aed26618b
  1. 2
      roles/mayan_edms/defaults/main.yml
  2. 12
      roles/papermerge/defaults/main.yml
  3. 1
      roles/papermerge/meta/main.yml
  4. 6
      roles/papermerge/tasks/archive_pre.yml
  5. 1
      roles/papermerge/tasks/install.yml
  6. 16
      roles/papermerge/templates/papermerge.conf.py.j2
  7. 3
      roles/redis_server/files/redis_copy_dumps.sh
  8. 2
      roles/redis_server/tasks/main.yml

@ -1,6 +1,6 @@
--- ---
mayan_version: 3.5.1 mayan_version: 4.0.11
mayan_root_dir: /opt/mayan-edms mayan_root_dir: /opt/mayan-edms
mayan_user: mayan-edms mayan_user: mayan-edms
# Should ansible handle upgrades ? If false, only initial install will be done # Should ansible handle upgrades ? If false, only initial install will be done

@ -1,11 +1,11 @@
--- ---
# Version of papermerge to deploy # Version of papermerge to deploy
papermerge_version: 1.5.0 papermerge_version: 2.0.1
# URL of the tarball # URL of the tarball
papermerge_archive_url: https://github.com/ciur/papermerge/archive/v{{ papermerge_version }}.tar.gz papermerge_archive_url: https://github.com/ciur/papermerge/archive/v{{ papermerge_version }}.tar.gz
# Expected sha1 of the archive, to check the download was OK # Expected sha1 of the archive, to check the download was OK
papermerge_archive_sha1: d97d63f3102a48af9aaeb261e498533c54d22bc3 papermerge_archive_sha1: 1dc4e144c299fa133ca135420b851a4730fc82d6
# Papermerge uses 2 ports. for gunicorn and will only listen on the loopback # Papermerge uses 2 ports. for gunicorn and will only listen on the loopback
# The other for nginx and is the one which will be accessible over the network # The other for nginx and is the one which will be accessible over the network
@ -35,3 +35,11 @@ papermerge_ocr_default_lang: fra
# Django secret key. A random one will be created if not set # Django secret key. A random one will be created if not set
# papermerge_secret_key: abc123 # papermerge_secret_key: abc123
# Import dir is where papermerge will look for files and consume them
papermerge_import_dir: "{{ papermerge_root_dir }}/input"
# IMAP settings for fetching document by email
# papermerge_imap_host: mail.example.org
# papermerge_imap_user:
# papermerge_imap_pass:

@ -6,4 +6,5 @@ dependencies:
- role: nginx - role: nginx
- role: postgresql_server - role: postgresql_server
when: papermerge_db_server == '127.0.0.1' or papermerge_db_server == 'localhost' when: papermerge_db_server == '127.0.0.1' or papermerge_db_server == 'localhost'
- role: redis_server

@ -4,6 +4,12 @@
file: path={{ papermerge_root_dir }}/archives/{{ papermerge_current_version }} state=directory file: path={{ papermerge_root_dir }}/archives/{{ papermerge_current_version }} state=directory
tags: ged tags: ged
- name: Install postgresql client
package:
name:
- postgresql13
tags: ged
- name: Stop sevices during upgrade - name: Stop sevices during upgrade
service: name={{ item }} state=stopped service: name={{ item }} state=stopped
loop: loop:

@ -9,6 +9,7 @@
- python-setuptools - python-setuptools
- python-psycopg2 - python-psycopg2
- postgresql-devel - postgresql-devel
- postgresql13
- tesseract - tesseract
- tesseract-langpack-fra - tesseract-langpack-fra
- tesseract-langpack-deu - tesseract-langpack-deu

@ -5,8 +5,7 @@ DBPASS = "{{ papermerge_db_pass }}"
DBHOST = "{{ papermerge_db_server }}" DBHOST = "{{ papermerge_db_server }}"
DBPORT = "{{ papermerge_db_port }}" DBPORT = "{{ papermerge_db_port }}"
MEDIA_DIR = "{{ papermerge_root_dir }}/data" MEDIA_DIR = "{{ papermerge_root_dir }}/data"
IMPORTER_DIR = "{{ papermerge_root_dir }}/input" IMPORTER_DIR = "{{ papermerge_import_dir }}"
FILES_MIN_UNMODIFIED_DURATION = 10
OCR_DEFAULT_LANGUAGE = "{{ papermerge_ocr_default_lang }}" OCR_DEFAULT_LANGUAGE = "{{ papermerge_ocr_default_lang }}"
LANGUAGE_FROM_AGENT = True LANGUAGE_FROM_AGENT = True
LANGUAGES = [ LANGUAGES = [
@ -27,3 +26,16 @@ METADATA_DATE_FORMATS = [
'yyyy-mm-dd', 'yyyy-mm-dd',
'month' 'month'
] ]
CELERY_BROKER_URL = "redis://"
CELERY_BROKER_TRANSPORT_OPTIONS = {}
CELERY_RESULT_BACKEND = "redis://localhost/0"
{% if papermerge_imap_host is defined and papermerge_imap_user is defined and papermerge_imap_pass is defined %}
IMPORT_MAIL_HOST = "{{ papermerge_imap_host }}"
IMPORT_MAIL_USER = "{{ papermerge_imap_user }}"
IMPORT_MAIL_PASS = "{{ papermerge_imap_pass }}"
IMPORT_MAIL_BY_USER = True
IMPORT_MAIL_BY_SECRET = True
{% endif %}
BINARY_STAPLER= "/opt/papermerge/venv/bin/stapler"

@ -6,8 +6,11 @@ DEST=/home/lbkp/redis
[ -d $DEST ] || mkdir -p $DEST [ -d $DEST ] || mkdir -p $DEST
echo "Saving dump.rdb"
/usr/bin/redis-cli save
for FILE in dump.rdb appendonly.aof; do for FILE in dump.rdb appendonly.aof; do
if [ -e /var/lib/redis/$FILE ]; then if [ -e /var/lib/redis/$FILE ]; then
echo "Copying /var/lib/redis/$FILE to $DEST"
cp /var/lib/redis/$FILE $DEST/ cp /var/lib/redis/$FILE $DEST/
fi fi
done done

@ -10,7 +10,7 @@
tags: redis tags: redis
- name: Deploy redis configuration - name: Deploy redis configuration
template: src=redis.conf.j2 dest={{ (redis_etc_dir.stat.isdir) | ternary('/etc/redis/redis.conf','/etc/redis.conf') }} template: src=redis.conf.j2 dest={{ (redis_etc_dir.stat.exists and redis_etc_dir.stat.isdir) | ternary('/etc/redis/redis.conf','/etc/redis.conf') }}
notify: restart redis notify: restart redis
tags: redis tags: redis

Loading…
Cancel
Save