2021-01-14 21:18:45 +01:00
Ansible Role: paperless-ng
==========================
2020-12-31 13:21:42 +01:00
2021-01-14 21:18:45 +01:00
Installs and configures paperless-ng EDMS on Debian/Ubuntu systems.
2020-12-31 13:21:42 +01:00
Requirements
------------
2021-01-14 21:18:45 +01:00
No special system requirements. Ansible 2.7 or newer is required.
Note that this role requires root access, so either run it in a playbook with a global `become: yes` , or invoke the role in your playbook like:
- hosts: all
roles:
2021-05-24 15:10:41 +02:00
- role: paperless-ng
2021-01-14 21:18:45 +01:00
become: yes
2020-12-31 13:21:42 +01:00
Role Variables
--------------
2021-01-14 21:18:45 +01:00
Most configuration variables from paperless-ng itself are available and accept their respective arguments.
2021-05-24 15:10:41 +02:00
Every `PAPERLESS_*` configuration variable is lowercased and instead prefixed with `paperlessng_*` in `defaults/main.yml` .
2021-01-14 21:18:45 +01:00
2021-05-24 15:10:41 +02:00
For a full listing including explanations and allowed values, see the current [documentation ](https://paperless-ng.readthedocs.io/en/latest/configuration.html ).
2021-01-14 21:18:45 +01:00
Additional variables available in this role are listed below, along with default values:
2021-05-26 08:30:17 +02:00
paperlessng_version: latest
2021-01-14 21:18:45 +01:00
The [release ](https://github.com/jonaswinkler/paperless-ng/releases ) archive version of paperless-ng to install.
2021-05-26 08:30:17 +02:00
`latest` stands for the latest release of paperless-ng.
To install a specific version of paperless-ng, use the tag name of the release, e. g. `ng-1.4.4` , or specify a branch or commit id.
2021-01-14 21:18:45 +01:00
paperlessng_redis_host: localhost
paperlessng_redis_port: 6379
2021-05-24 15:10:41 +02:00
Separate configuration values that combine into `PAPERLESS_REDIS` .
2021-01-14 21:18:45 +01:00
paperlessng_db_type: sqlite
Database to use. Default is file-based SQLite.
paperlessng_db_host: localhost
paperlessng_db_port: 5432
paperlessng_db_name: paperlessng
paperlessng_db_user: paperlessng
paperlessng_db_pass: paperlessng
paperlessng_db_sslmode: prefer
Database configuration (only applicable if `paperlessng_db_type == 'postgresql'` ).
paperlessng_directory: /opt/paperless-ng
Root directory paperless-ng is installed into.
paperlessng_virtualenv: "{{ paperlessng_directory }}/.venv"
Directory used for the virtual environment for paperless-ng.
paperlessng_ocr_languages:
- eng
List of OCR languages to install and configure (`apt search tesseract-ocr-*` ).
paperlessng_use_jbig2enc: True
Whether to install and use [jbig2enc ](https://github.com/agl/jbig2enc ) for OCRmyPDF.
paperlessng_big2enc_lossy: False
Whether to use jbig2enc's lossy compression mode.
paperlessng_superuser_name: paperlessng
paperlessng_superuser_email: paperlessng@example .com
paperlessng_superuser_password: paperlessng
Credentials of the initial superuser in paperless-ng.
paperlessng_system_user: paperlessng
paperlessng_system_group: paperlessng
System user and group to run the paperless-ng services as (will be created if required).
paperlessng_listen_address: 127.0.0.1
paperlessng_listen_port: 8000
Address and port for the paperless-ng service to listen on.
2020-12-31 13:21:42 +01:00
Dependencies
------------
2021-01-14 21:18:45 +01:00
No ansible dependencies.
2020-12-31 13:21:42 +01:00
Example Playbook
----------------
2021-01-14 21:18:45 +01:00
`playbook.yml` :
2020-12-31 13:21:42 +01:00
2021-01-14 21:18:45 +01:00
- hosts: all
become: yes
vars_files:
2021-05-24 15:10:41 +02:00
- vars/paperless-ng.yml
2020-12-31 13:21:42 +01:00
roles:
2021-05-24 15:10:41 +02:00
- paperless-ng
2021-01-14 21:18:45 +01:00
2021-05-24 15:10:41 +02:00
`vars/paperless-ng.yml` :
2020-12-31 13:21:42 +01:00
2021-01-14 21:18:45 +01:00
paperlessng_media_root: /mnt/media/smbshare
2020-12-31 13:21:42 +01:00
2021-01-14 21:18:45 +01:00
paperlessng_db_type: postgresql
paperlessng_db_pass: PLEASEPROVIDEASTRONGPASSWORDHERE
2020-12-31 13:21:42 +01:00
2021-02-03 07:53:49 +01:00
paperlessng_secret_key: AGAINPLEASECHANGETHISNOW
2020-12-31 13:21:42 +01:00
2021-01-14 21:18:45 +01:00
paperlessng_ocr_languages:
- eng
- deu