feat: Add basic paperless support

This commit is contained in:
moanos 2024-04-27 08:27:28 +02:00
parent 22c752d36a
commit c9e51f3f04
3 changed files with 72 additions and 0 deletions

View file

@ -463,6 +463,11 @@ mash_playbook_devture_systemd_service_manager_services_list_auto_itemized:
{{ ({'name': (oxitraffic_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'oxitraffic']} if oxitraffic_enabled else omit) }}
# /role-specific:oxitraffic
# role-specific:paperless
- |-
{{ ({'name': (paperless_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'paperless']} if paperless_enabled else omit) }}
# /role-specific:paperless
# role-specific:peertube
- |-
{{ ({'name': (peertube_identifier + '.service'), 'priority': 2000, 'groups': ['mash', 'peertube']} if peertube_enabled else omit) }}
@ -841,6 +846,18 @@ mash_playbook_devture_postgres_managed_databases_auto_itemized:
}}
# /role-specific:oxitraffic
# role-specific:paperless
- |-
{{
({
'name': paperless_database_name,
'username': paperless_database_username,
'password': paperless_database_password,
} if paperless_enabled and paperless_database_hostname == devture_postgres_identifier else omit)
}}
# /role-specific:paperless
# role-specific:peertube
- |-
{{
@ -3955,6 +3972,54 @@ oxitraffic_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certRe
# /role-specific:oxitraffic
# role-specific:paperless
########################################################################
# #
# paperless #
# #
########################################################################
paperless_enabled: false
paperless_identifier: "{{ mash_playbook_service_identifier_prefix }}paperless"
paperless_base_path: "{{ mash_playbook_base_path }}/{{ mash_playbook_service_base_directory_name_prefix }}paperless"
paperless_uid: "{{ mash_playbook_uid }}"
paperless_gid: "{{ mash_playbook_gid }}"
paperless_database_hostname: "{{ devture_postgres_identifier if devture_postgres_enabled else '' }}"
paperless_database_username: "paperless"
paperless_database_port: "{{ '5432' if devture_postgres_enabled else '' }}"
paperless_database_password: "{{ '%s' | format(mash_playbook_generic_secret_key) | password_hash('sha512', 'db.paperless', rounds=655555) | to_uuid }}"
paperless_systemd_required_services_list: |
{{
(['docker.service'])
+
([devture_postgres_identifier ~ '.service'] if devture_postgres_enabled and paperless_database_hostname == devture_postgres_identifier else [])
}}
paperless_container_additional_networks: |
{{
([mash_playbook_reverse_proxyable_services_additional_network] if mash_playbook_reverse_proxyable_services_additional_network else [])
+
([devture_postgres_container_network] if devture_postgres_enabled and paperless_database_hostname == devture_postgres_identifier and paperless_container_network != devture_postgres_container_network else [])
}}
paperless_container_labels_traefik_enabled: "{{ mash_playbook_traefik_labels_enabled }}"
paperless_container_labels_traefik_docker_network: "{{ mash_playbook_reverse_proxyable_services_additional_network }}"
paperless_container_labels_traefik_entrypoints: "{{ devture_traefik_entrypoint_primary }}"
paperless_container_labels_traefik_tls_certResolver: "{{ devture_traefik_certResolver_primary }}"
########################################################################
# #
# /paperless #
# #
########################################################################
# /role-specific:paperless
# role-specific:peertube
########################################################################

View file

@ -228,6 +228,9 @@
version: v0.9.0-0
name: oxitraffic
activation_prefix: oxitraffic_
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-paperless.git
version: v2.7.2-0
name: paperless
- src: git+https://github.com/mother-of-all-self-hosting/ansible-role-peertube.git
version: v6.0.4-0
name: peertube

View file

@ -290,6 +290,10 @@
- role: galaxy/oxitraffic
# /role-specific:oxitraffic
# role-specific:paperless
- role: galaxy/paperless
# /role-specific:paperless
# role-specific:peertube
- role: galaxy/peertube
# /role-specific:peertube