Rename the role entrypoints to main.yaml
This commit is contained in:
1 parent
c40b9a8e20
commit
0882eb0dfa
5 files changed
No files matched your search
@@ -0,0 +1,50 @@
|
||||
---
|
||||
- name: Pull image
|
||||
docker_image:
|
||||
name: "{{ image_name }}"
|
||||
source: pull
|
||||
force_source: yes
|
||||
|
||||
- name: Ensure Paperless Directories exists
|
||||
file:
|
||||
path: "{{ item }}"
|
||||
state: directory
|
||||
mode: "0755"
|
||||
loop:
|
||||
- "/var/lib/{{ host_directory }}"
|
||||
- "/var/lib/{{ host_directory }}/data"
|
||||
|
||||
- name: Run Paperless-NGX Docker container
|
||||
community.docker.docker_container:
|
||||
name: "{{ container_name }}"
|
||||
image: "{{ image_name }}:{{ image_version }}"
|
||||
state: started
|
||||
restart_policy: unless-stopped
|
||||
networks:
|
||||
- name: "{{ docker_network }}"
|
||||
env:
|
||||
PAPERLESS_URL: "https://{{ host }}"
|
||||
PAPERLESS_REDIS: redis://{{ redis_container }}:6379
|
||||
PAPERLESS_DBHOST: "{{ postgres_container }}"
|
||||
PAPERLESS_DBUSER: "{{ postgres_user }}"
|
||||
PAPERLESS_DBPASS: "{{ postgres_password }}"
|
||||
PAPERLESS_DBNAME: "{{ postgres_db }}"
|
||||
PAPERLESS_TIME_ZONE: "{{ paperless_time_zone }}"
|
||||
USERMAP_UID: "{{ paperless_uid }}"
|
||||
USERMAP_GID: "{{ paperless_uid }}"
|
||||
PAPERLESS_CONSUMER_RECURSIVE: "true"
|
||||
# inotify cannot see changes made remotely through WebDAV, so poll
|
||||
PAPERLESS_CONSUMER_POLLING: "60"
|
||||
PAPERLESS_OCR_USER_ARGS: '{"invalidate_digital_signatures": true}'
|
||||
volumes:
|
||||
- "/var/lib/{{ host_directory }}/data:/usr/src/paperless/data"
|
||||
- "/mnt/paperless/media:/usr/src/paperless/media:rslave"
|
||||
- "/mnt/paperless/export:/usr/src/paperless/export:rslave"
|
||||
- "/mnt/paperless/consume:/usr/src/paperless/consume:rslave"
|
||||
|
||||
- name: Export documents nightly to the Nextcloud export folder
|
||||
cron:
|
||||
name: Paperless export
|
||||
minute: "30"
|
||||
hour: "2"
|
||||
job: "docker exec {{ container_name }} document_exporter ../export -d"
|
||||
Reference in new issue
Block a user