paperless_ngx.paperless_ngx
Status | Ereignis |
---|---|
Wöchentlicher Zeitplan | |
Letzte PR |
Ansible Rolle: paperless_ngx
Installiert und konfiguriert das paperless-ngx EDMS.
-
- 1.1. Ansible
- 1.2. Unterstützte Betriebssysteme
1. Anforderungen
1.1. Ansible
ansible_version_minimum: "2.12"
oder neuer wird benötigt.
Die folgenden Ansible Sammlungen müssen installiert werden (über ansible-galaxy collection install
)
- community.general
- ansible.posix
1.2. Unterstützte Betriebssysteme
- Debian (>=11)
- Ubuntu (>=focal)
2. Rollenvariablen
Die meisten Konfigurationsvariablen von paperless-ngx selbst sind verfügbar und akzeptieren ihre jeweiligen Argumente.
Jede PAPERLESS_*
Konfigurationsvariable wird kleingeschrieben und stattdessen mit paperless_ngx_conf_*
in defaults/main.yml
vorangestellt.
Für eine vollständige Liste mit Erklärungen und erlaubten Werten, siehe die aktuelle Dokumentation.
Die folgenden Abschnitte sind unterteilt in:
- Rollen-spezifische Variablen
- Original paperless-ngx Konfigurationsvariablen
2.1. Rollen-spezifische Variablen
Name | Standardwert | Beschreibung |
---|---|---|
paperless_ngx_db_type |
sqlite | Verfügbare Datenbanktypen sind sqlite und postgresql. Wenn postgresql gewählt wird, müssen auch die anderen db_ Variablen konfiguriert werden. |
paperless_ngx_dependency_install_tmp_dir |
/tmp/ | Verzeichnis für temporäre Installationsdateien von Abhängigkeiten |
paperless_ngx_dir_force_permission_exclude |
[] | Welche Verzeichnisse sollen von der Berechtigungsüberprüfung/-einstellung übersprungen werden. Siehe Dokumentation. |
paperless_ngx_dir_installation |
/opt/paperless-ngx | Das Verzeichnis, in dem die statischen Installationsdateien von paperless-ngx gespeichert werden. |
paperless_ngx_dir_python |
/opt/python/{{ paperless_ngx_python_version_short }} | Das Verzeichnis, in dem die Python-Binärdateien kompiliert werden. |
paperless_ngx_dir_runtime_data |
/var/lib/paperless-ngx | Das Verzeichnis, in dem die Laufzeitdaten gespeichert werden. |
paperless_ngx_dir_virtualenv |
"{{ paperless_ngx_dir_installation }}/.venv" | Das Verzeichnis für die benötigte Python-Umgebung. |
paperless_ngx_jbig2enc_enabled |
true | Ob jbig2enc für OCRmyPDF installiert und verwendet werden soll. |
paperless_ngx_jbig2enc_lossy |
false | Ob jbig2enc im verlustbehafteten Modus ausgeführt wird oder nicht. |
paperless_ngx_jbig2enc_version |
0.29 | Welche Version installiert werden soll. |
paperless_ngx_redis_host |
localhost | Redis-Host |
paperless_ngx_redis_port |
6379 | Redis-Port |
paperless_ngx_system_group |
paperlessngx | Die Gruppe, zu der der Systembenutzer gehört. |
paperless_ngx_system_user |
paperlessngx | Der Benutzer, der die Dienste ausführt und die Daten besitzt. |
paperless_ngx_system_user_additional_groups |
[] | Optional den Systembenutzer zu weiteren Gruppen hinzufügen. Zum Beispiel zur Leseberechtigung von TLS-Zertifikaten, die von der Gruppe ssl-cert gelesen werden können. |
paperless_ngx_version |
latest | Zu installierende Softwareversion. Verwenden Sie latest oder eine spezifische Version im Format '2.0.0' . Nur paperless_ngx_version_minimum: '2.0.0' und höher unterstützt. |
2.2. Paperless-ngx Konfigurationsvariablen
Alle kommenden Variablen entsprechen den Variablen aus den paperless-ngx-Dokumenten. Die folgende Liste von Variablen ist alphabetisch sortiert, um die Wartung dieser Rolle zu erleichtern. In der offiziellen Dokumentation sind diese den entsprechenden Kategorien zugeordnet.
Um Platz zu sparen, wird in der Tabelle unten eine Reihe von Abkürzungen verwendet:
- I - In dieser Rolle implementiert? [Y/N]
- O - Variable soll überschrieben werden? [Y/N] Wenn nein, sollte sie nicht verändert werden.
- H - Hinweis
- V - Version von paperless-ngx, die diese Variable eingeführt hat.
Name | Standardwert | I | O | H | V |
---|---|---|---|---|---|
paperless_ngx_conf_account_allow_signups |
false | Y | Y | 2.5 | |
paperless_ngx_conf_account_default_http_protocol |
https | Y | Y | 2.5 | |
paperless_ngx_conf_account_email_verification |
optional | Y | Y | 2.6 | |
paperless_ngx_conf_account_session_remember |
false | Y | Y | 2.7 | |
paperless_ngx_conf_admin_mail |
root@localhost | Y | Y | ||
paperless_ngx_conf_admin_password |
Y | Y | Das Superuser-Passwort. Wenn nicht vom Benutzer definiert, wird ein zufälliges Passwort generiert -> siehe Abschnitt unten über Passwörter. | ||
paperless_ngx_conf_admin_user |
admin | Y | Y | ||
paperless_ngx_conf_allowed_hosts |
"*" | Y | Y | ||
paperless_ngx_conf_app_logo |
None | Y | Y | 2.4 | |
paperless_ngx_conf_app_title |
None | Y | Y | 2.4 | |
paperless_ngx_conf_apps |
None | Y | Y | 2.5 | |
paperless_ngx_conf_audit_log_enabled |
false | Y | Y | 2.0 | |
paperless_ngx_conf_auto_login_username |
"" | Y | Y | ||
paperless_ngx_conf_bind_addr |
"[::]" | Y | Y | ||
paperless_ngx_conf_consumer_asn_barcode_prefix |
ASN | Y | Y | 1.12 | |
paperless_ngx_conf_consumer_collate_double_sided_subdir_name |
"double-sided" | Y | Y | 1.17 | |
paperless_ngx_conf_consumer_collate_double_sided_tiff_support |
false | Y | Y | 1.17 | |
paperless_ngx_conf_consumer_barcode_dpi |
300 | Y | Y | 1.16 | |
paperless_ngx_conf_consumer_barcode_scanner |
"PYZBAR" | Y | Y | 1.14 | |
paperless_ngx_conf_consumer_barcode_string |
'PATCHT' | Y | Y | ||
paperless_ngx_conf_consumer_barcode_tiff_support |
false | Y | Y | ||
paperless_ngx_conf_consumer_barcode_upscale |
0.0 | Y | Y | 1.16 | |
paperless_ngx_conf_consumer_delete_duplicates |
false | Y | Y | ||
paperless_ngx_conf_consumer_enable_asn_barcode |
false | Y | Y | 1.12 | |
paperless_ngx_conf_consumer_enable_barcodes |
false | Y | Y | ||
paperless_ngx_conf_consumer_enable_collate_double_sided |
false | Y | Y | 1.17 | |
paperless_ngx_conf_consumer_enable_tag_barcode |
false | Y | Y | 2.5 | |
paperless_ngx_conf_consumer_ignore_patterns |
[".DS_STORE/", "._", ".stfolder/", ".stversions/", ".localized/*", "desktop.ini"] | Y | Y | ||
paperless_ngx_conf_consumer_inotify_delay |
0.5 | Y | Y | ||
paperless_ngx_conf_consumer_polling_delay |
5 | Y | Y | ||
paperless_ngx_conf_consumer_polling_retry_count |
5 | Y | Y | ||
paperless_ngx_conf_consumer_polling |
0 | Y | Y | ||
paperless_ngx_conf_consumer_recursive |
false | Y | Y | ||
paperless_ngx_conf_consumer_subdirs_as_tags |
false | Y | Y | ||
paperless_ngx_conf_consumer_tag_barcode_mapping |
'{"TAG:(.*)": "\\g<1>"}' | Y | Y | 2.5 | |
paperless_ngx_conf_consumption_dir |
"{{ paperless_ngx_dir_runtime_data }}/consumption" | Y | Y | ||
paperless_ngx_conf_convert_binary |
convert | Y | Y | ||
paperless_ngx_conf_convert_memory_limit |
0 | Y | Y | ||
paperless_ngx_conf_convert_tmpdir |
"" | Y | Y | ||
paperless_ngx_conf_cookie_prefix |
"" | Y | Y | ||
paperless_ngx_conf_cors_allowed_hosts |
http://localhost:8000 | Y | Y | ||
paperless_ngx_conf_csrf_trusted_origins |
Y | Y | |||
paperless_ngx_conf_data_dir |
"{{ paperless_ngx_dir_runtime_data }}/data" | Y | Y | ||
paperless_ngx_conf_date_order |
"DMY" | Y | Y | ||
paperless_ngx_conf_db_timeout |
Y | Y | |||
paperless_ngx_conf_dbengine |
Y | N | Wird von der Rolle nicht verwendet | ||
paperless_ngx_conf_dbhost |
localhost | Y | Y | ||
paperless_ngx_conf_dbname |
paperlessngx | Y | Y | ||
paperless_ngx_conf_dbpass |
"" | Y | Y | Das DB-Passwort. Wenn nicht vom Benutzer definiert, wird ein zufälliges Passwort generiert -> siehe Abschnitt unten über Passwörter. | |
paperless_ngx_conf_dbport |
5432 | Y | Y | ||
paperless_ngx_conf_dbsslcert |
None | Y | Y | 1.14 | |
paperless_ngx_conf_dbsslkey |
None | Y | Y | 1.14 | |
paperless_ngx_conf_dbsslmode |
prefer | Y | Y | ||
paperless_ngx_conf_dbsslrootcert |
None | Y | Y | 1.14 | |
paperless_ngx_conf_dbuser |
paperlessngx | Y | Y | ||
paperless_ngx_conf_disable_regular_login |
false | Y | Y | 2.6 | |
paperless_ngx_conf_email_certificate_location |
None | Y | Y | 1.17 | |
paperless_ngx_conf_email_from |
{{ paperless_ngx_conf_email_host_user }} | Y | Y | 2.0 | |
paperless_ngx_conf_email_host |
"localhost" | Y | Y | 2.0 | |
paperless_ngx_conf_email_host_user |
"" | Y | Y | 2.0 | |
paperless_ngx_conf_email_host_password |
"" | Y | Y | 2.0 | |
paperless_ngx_conf_email_port |
25 | Y | Y | 2.0 | |
paperless_ngx_conf_email_task_cron |
"*/10 * * * *" | Y | Y | 1.12 | |
paperless_ngx_conf_email_use_ssl |
false | Y | Y | 2.0 | |
paperless_ngx_conf_email_use_tls |
false | Y | Y | 2.0 | |
paperless_ngx_conf_empty_trash_delay |
30 | Y | Y | 2.10 | |
paperless_ngx_conf_empty_trash_dir |
"{{ paperless_ngx_dir_runtime_data }}/trash" | Y | Y | 2.10 | |
paperless_ngx_conf_empty_trash_task_cron |
"0 1 * * *" | Y | Y | 2.10 | |
paperless_ngx_conf_enable_compression |
true | Y | Y | 1.13 | |
paperless_ngx_conf_enable_flower |
false | Y | Y | Ob Flower gestartet werden soll oder nicht. Siehe Using Flower für weitere Informationen | 1.10 |
paperless_ngx_conf_enable_http_remote_user |
false | Y | Y | ||
paperless_ngx_conf_enable_http_remote_user_api |
false | Y | Y | 2.5 | |
paperless_ngx_conf_enable_nltk |
1 | Y | Y | 1.11 | |
paperless_ngx_conf_enable_update_check |
Y | Y | Wird in Zukunft entfernt | ||
paperless_ngx_conf_filename_date_order |
"" | Y | Y | ||
paperless_ngx_conf_filename_format_remove_none |
false | Y | Y | ||
paperless_ngx_conf_filename_format |
"" | Y | Y | ||
paperless_ngx_conf_force_script_name |
"" | Y | Y | ||
paperless_ngx_conf_gs_binary |
gs | Y | Y | ||
paperless_ngx_conf_http_remote_user_header_name |
HTTP_REMOTE_USER | Y | Y | ||
paperless_ngx_conf_ignore_dates |
"" | Y | Y | ||
paperless_ngx_conf_index_task_cron |
"0 0 * * *" | Y | Y | 1.12 | |
paperless_ngx_conf_logging_dir |
"{{ paperless_ngx_dir_runtime_data }}/log" | ||||
paperless_ngx_conf_logout_redirect_url |
Y | Y | |||
paperless_ngx_conf_logrotate_max_backups |
20 | Y | Y | ||
paperless_ngx_conf_logrotate_max_size |
1024 * 1024 | Y | Y | ||
paperless_ngx_conf_max_image_pixels |
None | Y | Y | 2.6 | |
paperless_ngx_conf_media_root |
"{{ paperless_ngx_dir_runtime_data }}/media" | Y | Y | ||
paperless_ngx_conf_model_file |
"{{ paperless_ngx_conf_data_dir }}/classification_model.pickle" | Y | Y | 2.9 | |
paperless_ngx_conf_nltk_dir |
/usr/share/nltk_data | Y | Y | 1.11 | |
paperless_ngx_conf_number_of_suggested_dates |
3 | Y | Y | ||
paperless_ngx_conf_ocr_clean |
clean | Y | Y | ||
paperless_ngx_conf_ocr_color_conversion_strategy |
"RGB" | Y | Y | 2.1 | |
paperless_ngx_conf_ocr_deskew |
true | Y | Y | ||
paperless_ngx_conf_ocr_image_dpi |
"" | Y | Y | ||
paperless_ngx_conf_ocr_language |
eng | Y | Y | ||
paperless_ngx_conf_ocr_languages |
[eng,deu,fra,ita,spa] | Y | Y | ||
paperless_ngx_conf_ocr_max_image_pixels |
Y | Y | |||
paperless_ngx_conf_ocr_mode |
skip | Y | Y | ||
paperless_ngx_conf_ocr_output_type |
pdfa | Y | Y | ||
paperless_ngx_conf_ocr_pages |
0 | Y | Y | ||
paperless_ngx_conf_ocr_rotate_pages_threshold |
12 | Y | Y | ||
paperless_ngx_conf_ocr_rotate_pages |
true | Y | Y | ||
paperless_ngx_conf_ocr_skip_archive_file |
"never" | Y | Y | 1.14 | |
paperless_ngx_conf_ocr_user_args |
[optimize=1] | Y | Y | ||
paperless_ngx_conf_port |
8000 | Y | Y | ||
paperless_ngx_conf_post_consume_script |
"" | Y | Y | ||
paperless_ngx_conf_pre_consume_script |
"" | Y | Y | ||
paperless_ngx_conf_proxy_ssl_header |
None | Y | Y | 1.14 | |
paperless_ngx_conf_redis |
redis://{{ paperless_ngx_redis_host }}:{{ paperless_ngx_redis_port }} | Y | N | ||
paperless_ngx_conf_redis_prefix |
"" | Y | Y | 1.17 | |
paperless_ngx_conf_sanity_task_cron |
"30 0 * * sun" | Y | Y | 1.12 | |
paperless_ngx_conf_secret_key |
"" | Y | Y | Wenn nicht vom Benutzer definiert, wird ein zufälliges Passwort generiert -> siehe Abschnitt unten über Passwörter. | |
paperless_ngx_conf_social_auto_signup |
false | Y | Y | 2.5 | |
paperless_ngx_conf_socialaccount_allow_signups |
true | Y | Y | 2.5 | |
paperless_ngx_conf_socialaccount_providers |
"{}" | Y | Y | 2.5 | |
paperless_ngx_conf_static_url |
/static/ | Y | Y | ||
paperless_ngx_conf_staticdir |
../static | Y | N | ||
paperless_ngx_conf_supervisord_working_dir |
None | Y | Y | 2.5 | |
paperless_ngx_conf_task_workers |
1 | Y | Y | ||
paperless_ngx_conf_threads_per_worker |
paperless_ngx_conf_task_workers | Y | Y | ||
paperless_ngx_conf_thumbnail_font_name |
/usr/share/fonts/liberation/LiberationSerif-Regular.ttf | Y | Y | ||
paperless_ngx_conf_tika_enabled |
false | Y | Y | ||
paperless_ngx_conf_tika_endpoint |
http://localhost:9998 | Y | Y | ||
paperless_ngx_conf_tika_gotenberg_endpoint |
http://localhost:3000 | Y | Y | ||
paperless_ngx_conf_time_zone |
Europe/London | Y | Y | ||
paperless_ngx_conf_train_task_cron |
"5 */1 * * *" | Y | Y | 1.12 | |
paperless_ngx_conf_trusted_proxies |
"" | Y | Y | 1.14 | |
paperless_ngx_conf_url |
http://localhost:8000 | Y | Y | ||
paperless_ngx_conf_use_x_forward_host |
False | Y | Y | 1.14 | |
paperless_ngx_conf_use_x_forward_port |
False | Y | Y | 1.14 | |
paperless_ngx_conf_usermap_gid |
Y | Y | Systembenutzer gid | ||
paperless_ngx_conf_usermap_uid |
Y | Y | Systembenutzer id | ||
paperless_ngx_conf_webserver_workers |
1 | Y | Y | ||
paperless_ngx_conf_worker_timeout |
1800 | Y | Y | ||
3. Nutzungsratgeber
3.1. Aktualisierung von Paperless-ngx
Wenn Sie Paperless-ngx mithilfe dieser Rolle installiert haben und auf eine neuere Version aktualisieren möchten, müssen Sie nur diese Rolle erneut ausführen (wenn Sie latest
als Versionsbezeichnung gewählt haben). Wenn Sie eine spezifische Version zur Installation angegeben haben, müssen Sie nur diesen Wert auf eine neuere Version ändern und die Rolle erneut ausführen.
Diese Rolle wird nichts anderes als Paperless-ngx aktualisieren. Die Aktualisierungen des Betriebssystems und abhängiger Pakete müssen separat behandelt werden.
BITTE DENKEN SIE AN SICHERUNGEN, bevor Sie ein Upgrade durchführen.
3.2. Sicherung/Wiederherstellung
Bitte beachten Sie, dass diese Rolle keinen Mechanismus für Sicherungen oder Wiederherstellungen bietet. Dies ist beabsichtigt. Um die Belange zu trennen, konzentriert sich diese Rolle nur auf die 'Bereitstellungen' der Softwareartefakte und ihrer Konfiguration. Ein Beispiel für eine funktionierende Backup-Strategie finden Sie hier: Link zu einem Beispiel für eine Backup-Strategie
3.3. Generiertes Passwort
Die Rolle verwendet die Passwort-Suche von Ansible:
- Wenn ein Passwort von der Rolle generiert wird, speichert Ansible es lokal in pngx_instances/{{ inventar_hostname }}/ (relativ zum Arbeitsverzeichnis)
- Wenn die Datei bereits existiert, wird ihr Inhalt wiederverwendet
- siehe die Dokumentation zur Passwortsuche von Ansible für weitere Informationen
3.4. Trennung von statischen (~ Installation) und dynamischen (~ Laufzeit) Daten
Diese Rolle überprüft, dass Sie keines der Datenverzeichnisse (wie z.B. consumption usw.) als Unterverzeichnis des Installationspfads festlegen. Um mir das Leben zu erleichtern, löscht diese Rolle den Installationsordner und erstellt einen völlig neuen, wenn ein Upgrade durchgeführt wird. Das sorgt für Frische und Sauberkeit. So werden Sie auch vor unerwünschten Löschungen Ihrer Daten während der Updates geschützt.
3.5. PostgreSQL-Nutzung
Wenn Sie Paperless-ngx zusammen mit PostgreSQL verwenden möchten, ist eine laufende Instanz von PostgreSQL erforderlich. Diese Rolle installiert Ihnen jedoch nicht automatisch eine solche Datenbankinstanz. Hier können Sie jedoch lesen, wie Sie eine solche Instanz von Grund auf einrichten: Link zu einem Beispiel-Playbook
4. Abhängigkeiten
Keine Abhängigkeiten
5. Beispiel Playbooks
minimal_runnable_playbook.yml
:
- hosts: all
roles:
- { role: paperless_ngx.paperless_ngx }
vars:
var1:
var2:
...
6. Mitwirken
Wir laden Sie ein, zu dieser Rolle beizutragen! Bitte schauen Sie sich den Beitragsleitfaden für Richtlinien an, wie Sie vorgehen können.
7. Lizenz
MIT
ansible-galaxy install paperless_ngx.paperless_ngx