Update to 0.9.9

This commit is contained in:
Fabian Koller 2020-12-22 19:30:53 +01:00
parent 50c5a23de8
commit e48294a74b
No known key found for this signature in database
GPG Key ID: 4EFE4C946404B82A
2 changed files with 13 additions and 6 deletions

View File

@ -1,5 +1,5 @@
---
paperlessng_version: 0.9.8
paperlessng_version: 0.9.9
paperlessng_directory: /opt/paperless-ng
paperlessng_consumption_dir: "{{ paperlessng_directory }}/consumption"
paperlessng_data_dir: "{{ paperlessng_directory }}/data"
@ -32,6 +32,7 @@ paperlessng_redis_host: localhost
paperlessng_redis_port: 6379
paperlessng_db_type: sqlite # or postgresql
# Below entries only apply for paperlessng_db_type=='postgresql'
paperlessng_db_host: localhost
paperlessng_db_port: 5432
paperlessng_db_name: paperlessng

View File

@ -169,7 +169,7 @@
line: "PAPERLESS_OCR_USER_ARG=\"{{ paperlessng_ocrmypdf_args }}{{ ' --jbig2-lossy' if paperlessng_use_jbig2enc else '' }}\""
- regexp: "^#?PAPERLESS_TIME_ZONE="
line: "PAPERLESS_TIME_ZONE={{ paperlessng_time_zone }}"
no_log: true
#no_log: true
- name: configure paperless-ng database [sqlite]
lineinfile:
@ -209,17 +209,21 @@
extra_args: --upgrade
- name: collect static files
command: "{{ paperlessng_virtualenv }}/bin/python3 {{ paperlessng_directory }}/src/manage.py collectstatic --clear --no-input"
command: "{{ paperlessng_virtualenv }}/bin/python3 manage.py collectstatic --clear --no-input"
args:
chdir: "{{ paperlessng_directory }}/src"
- name: create database schema
command: "{{ paperlessng_virtualenv }}/bin/python3 {{ paperlessng_directory }}/src/manage.py migrate"
command: "{{ paperlessng_virtualenv }}/bin/python3 manage.py migrate"
args:
chdir: "{{ paperlessng_directory }}/src"
register: database_schema
changed_when: '"No migrations to apply." not in database_schema.stdout'
- name: create first paperless user
# "manage.py createsuperuser" only works on interactive TTYs
command: |
{{ paperlessng_virtualenv }}/bin/python3 {{ paperlessng_directory }}/src/manage.py shell -c "
{{ paperlessng_virtualenv }}/bin/python3 manage.py shell -c "
from django.contrib.auth.models import User
from django.contrib.auth.hashers import get_hasher
@ -242,6 +246,8 @@
User.objects.create_superuser('{{ paperlessng_superuser_name }}', '{{ paperlessng_superuser_email }}', '{{ paperlessng_superuser_password }}')
print('changed')
"
args:
chdir: "{{ paperlessng_directory }}/src"
register: superuser
changed_when: superuser.stdout == 'changed'
no_log: true