From 9730cac1a6dfd87e7fdd96c851616c31ce8268e4 Mon Sep 17 00:00:00 2001 From: Gabriel Augendre Date: Thu, 5 Dec 2024 22:56:01 +0100 Subject: [PATCH] add download free mobile --- playbooks/apps/paperless-ngx.yaml | 15 +++++++++++++++ .../paperless-ngx/download-free-mobile.j2 | 5 +++++ playbooks/system/cron.yaml | 9 ++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100755 playbooks/apps/templates/paperless-ngx/download-free-mobile.j2 diff --git a/playbooks/apps/paperless-ngx.yaml b/playbooks/apps/paperless-ngx.yaml index 7d62213..12824ef 100644 --- a/playbooks/apps/paperless-ngx.yaml +++ b/playbooks/apps/paperless-ngx.yaml @@ -40,3 +40,18 @@ 63373965316165353930343966333337393136633239396261353566633638386331646631393730 3266386637653732640a393538346532353332333530303338636439653432323131643864356337 66646165376330643132653333393730643337356639613862616430623635376238 + + downloader_free_mobile_username: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 63323964626435316365343261633534396439356636616366376565363338323337343263313661 + 3764336135633062613037656137343965366339353864630a356264336636663136613833663330 + 38656165336265636333373532656137396130346363383739616363636436333733373938336337 + 6331366663336266300a633536666364333931383837313030646638346561323435653933396363 + 6665 + downloader_free_mobile_password: !vault | + $ANSIBLE_VAULT;1.1;AES256 + 65656539386465616638613537633861623161633537643035333466326432323464376333646530 + 3637643931626537393864316639366636653431383433360a383532353239376636613033376233 + 34393732633031633738313638306637366234386337383166303830353838663237636131363435 + 3061303733373135310a353038316532396263653033303662313661333432333239626137353261 + 32346530373030393566613936373535396533366663393963636536323065343136 diff --git a/playbooks/apps/templates/paperless-ngx/download-free-mobile.j2 b/playbooks/apps/templates/paperless-ngx/download-free-mobile.j2 new file mode 100755 index 0000000..d0786c2 --- /dev/null +++ b/playbooks/apps/templates/paperless-ngx/download-free-mobile.j2 @@ -0,0 +1,5 @@ +#!/bin/bash +set -euo pipefail + +pushd /mnt/data/paperless-ngx +./downloader free-mobile -o consume -u {{downloader_free_mobile_username}} -p {{downloader_free_mobile_password}} --headless --no-interaction diff --git a/playbooks/system/cron.yaml b/playbooks/system/cron.yaml index b4afc59..7465b52 100644 --- a/playbooks/system/cron.yaml +++ b/playbooks/system/cron.yaml @@ -83,4 +83,11 @@ minute: 0 hour: 13 day: 5 - job: /mnt/data/bin/healthcheck download-freebox /mnt/data/paperless-ngx/download-freebox + job: /mnt/data/bin/healthcheck downloader /mnt/data/paperless-ngx/download-freebox + - name: Cron - Download Free Mobile invoice + ansible.builtin.cron: + name: Download Free Mobile invoice + minute: 0 + hour: 13 + day: 30 + job: /mnt/data/bin/healthcheck downloader /mnt/data/paperless-ngx/download-free-mobile