From fea52e70b420aaa22a31451dc2ae44bf26091f62 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Sun, 18 Oct 2020 19:00:09 +0200 Subject: [PATCH] Update to 2020-10-18 19:00 --- roles/papermerge/tasks/conf.yml | 2 +- roles/papermerge/tasks/directories.yml | 2 ++ roles/papermerge/tasks/install.yml | 11 +++++++++++ roles/papermerge/templates/papermerge-worker.service.j2 | 1 + roles/papermerge/templates/papermerge.conf.py.j2 | 3 --- roles/repo_nux_dextop/tasks/main.yml | 1 + 6 files changed, 16 insertions(+), 4 deletions(-) diff --git a/roles/papermerge/tasks/conf.yml b/roles/papermerge/tasks/conf.yml index 5224af5..d0bc88a 100644 --- a/roles/papermerge/tasks/conf.yml +++ b/roles/papermerge/tasks/conf.yml @@ -13,7 +13,7 @@ src: production.py.j2 dest: "{{ papermerge_root_dir }}/app/config/settings/production.py" group: "{{ papermerge_user }}" - mode: 640 + mode: 0640 tags: ged - name: Iniialize or update the database diff --git a/roles/papermerge/tasks/directories.yml b/roles/papermerge/tasks/directories.yml index f1f25e6..7e9af5a 100644 --- a/roles/papermerge/tasks/directories.yml +++ b/roles/papermerge/tasks/directories.yml @@ -14,6 +14,8 @@ owner: "{{ papermerge_user }}" mode: 700 - dir: "{{ papermerge_root_dir }}/input" + owner: "{{ papermerge_user }}" + mode: 700 - dir: "{{ papermerge_root_dir }}/tmp" owner: "{{ papermerge_user }}" mode: 700 diff --git a/roles/papermerge/tasks/install.yml b/roles/papermerge/tasks/install.yml index 4a66198..fa0f10b 100644 --- a/roles/papermerge/tasks/install.yml +++ b/roles/papermerge/tasks/install.yml @@ -103,3 +103,14 @@ systemd: daemon_reload=True when: papermerge_units.results | selectattr('changed','equalto',True) | list | length > 0 tags: ged + +- name: Install a wrapper for manage.py + copy: + content: | + #!/bin/bash + cd {{ papermerge_root_dir }}/app + {{ papermerge_root_dir }}/venv/bin/python ./manage.py $@ + dest: /usr/local/bin/papermerge + mode: 755 + tags: ged + diff --git a/roles/papermerge/templates/papermerge-worker.service.j2 b/roles/papermerge/templates/papermerge-worker.service.j2 index 1f9c797..8c933db 100644 --- a/roles/papermerge/templates/papermerge-worker.service.j2 +++ b/roles/papermerge/templates/papermerge-worker.service.j2 @@ -6,6 +6,7 @@ After=network.target Type=simple WorkingDirectory={{ papermerge_root_dir }}/app Environment=DJANGO_SETTINGS_MODULE=config.settings.production +Environment=OMP_THREAD_LIMIT={{ ansible_processor_vcpus }} ExecStart={{ papermerge_root_dir }}/venv/bin/python manage.py worker User={{ papermerge_user }} Group={{ papermerge_user }} diff --git a/roles/papermerge/templates/papermerge.conf.py.j2 b/roles/papermerge/templates/papermerge.conf.py.j2 index 1434ae2..434f7ce 100644 --- a/roles/papermerge/templates/papermerge.conf.py.j2 +++ b/roles/papermerge/templates/papermerge.conf.py.j2 @@ -9,9 +9,6 @@ IMPORTER_DIR = "{{ papermerge_root_dir }}/input" FILES_MIN_UNMODIFIED_DURATION = 10 OCR_DEFAULT_LANGUAGE = "{{ papermerge_ocr_default_lang }}" LANGUAGE_FROM_AGENT = True -MIDDLEWARE.append( - 'django.middleware.locale.LocaleMiddleware' -) TASK_QUEUE_DIR = "{{ papermerge_root_dir }}/tmp/queue" OCR_LANGUAGES = { "deu": "Deutsch", diff --git a/roles/repo_nux_dextop/tasks/main.yml b/roles/repo_nux_dextop/tasks/main.yml index 7239054..3dca619 100644 --- a/roles/repo_nux_dextop/tasks/main.yml +++ b/roles/repo_nux_dextop/tasks/main.yml @@ -7,4 +7,5 @@ baseurl: http://li.nux.ro/download/nux/dextop/el7/$basearch/ http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/$basearch/ gpgcheck: True gpgkey: http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro + tags: repo