diff --git a/menu/functions/install.sh b/menu/functions/install.sh index fdb4add2..fd52741d 100644 --- a/menu/functions/install.sh +++ b/menu/functions/install.sh @@ -141,7 +141,12 @@ file="/opt/plexguide/menu/pg.yml" else ansible-playbook opt/plexguide/menu/version/missing_pull.yml; fi } +remove(){ + ansible-playbook /opt/plexguide/menu/pg.yml --tag remove +} + templatespart2() { + remove alias 1>/dev/null 2>&1 owned 1>/dev/null 2>&1 check diff --git a/menu/pg.yml b/menu/pg.yml index ea33afc3..f890dc24 100644 --- a/menu/pg.yml +++ b/menu/pg.yml @@ -17,3 +17,4 @@ - { role: journal, tags: ['journal'] } - { role: plex_autoscan, tags: ['plex_autoscan'] } - { role: plex_dupefinder, tags: ['plex_dupefinder'] } + - { role: remove, tags: ['remove'] } diff --git a/menu/roles/clean-encrypt/tasks/main.yml b/menu/roles/clean-encrypt/tasks/main.yml deleted file mode 100644 index 35038b94..00000000 --- a/menu/roles/clean-encrypt/tasks/main.yml +++ /dev/null @@ -1,40 +0,0 @@ -#!/bin/bash -# -# Title: PGBlitz (Reference Title File) -# Author(s): Admin9705 - Deiteq - Sub7Seven -# URL: https://pgblitz.com - http://github.pgblitz.com -# GNU: General Public License v3.0 -################################################################################ ---- -- name: Install Cloudplow; remove old cronjob - cron: - name: 'Cloudplow Clean' - user: 'root' - state: absent - -- name: Install Cloudplow; remove old directory - file: - state: absent - path: '/opt/appdata/cloudplow' - -- name: Install Cloudplow; download - become_user: root - shell: 'git clone https://github.com/Admin9705/clean /opt/appdata/cloudplow' - -- name: Install Cloudplow; dependencies - become_user: root - shell: 'python3 -m pip install -r /opt/appdata/cloudplow/requirements.txt' - -- name: Install Cloudplow; config - template: - src: config.js2 - dest: /opt/appdata/cloudplow/config.json - force: yes - -- name: Install Cloudplow; cronjob - cron: - name: 'Cloudplow Clean' - user: 'root' - minute: '0' - hour: '0' - job: 'cd /opt/appdata/cloudplow && /usr/bin/python3 cloudplow.py clean' diff --git a/menu/roles/clean-encrypt/templates/config.js2 b/menu/roles/clean-encrypt/templates/config.js2 deleted file mode 100644 index 7a1ebd9e..00000000 --- a/menu/roles/clean-encrypt/templates/config.js2 +++ /dev/null @@ -1,53 +0,0 @@ -{ - "core": { - "dry_run": false - }, - "hidden": { - "/mnt/move/.unionfs-fuse": { - "hidden_remotes": [ - "gcrypt" - ] - } - }, - "notifications": { - "Pushover": { - "app_token": "app token goes here", - "service": "pushover", - "user_token": "user token goes here" - } - }, - "remotes": { - "gcrypt": { - "hidden_remote": "gcrypt:", - "rclone_excludes": [ - "**partial~", - "**_HIDDEN~", - ".unionfs/**", - ".unionfs-fuse/**" - ], - "rclone_extras": { - "--checkers": 16, - "--drive-chunk-size": "64M", - "--stats": "60s", - "--transfers": 8, - "--verbose": 1 - }, - "rclone_sleeps": { - "Error 403: User rate limit exceeded": { - "count": 5, - "sleep": 25, - "timeout": 300 - } - }, - "remove_empty_dir_depth": 10, - "upload_folder": "/mnt/move", - "upload_remote": "gcrypt:" - } - }, - "syncer": { - }, - "uploader": { - "google": { - } - } -} diff --git a/menu/roles/remove/tasks/main.yml b/menu/roles/remove/tasks/main.yml new file mode 100644 index 00000000..07cf7a94 --- /dev/null +++ b/menu/roles/remove/tasks/main.yml @@ -0,0 +1,26 @@ +#!/bin/bash +# +# Title: PTS remove old garbage +# YML Author: MrDoob for PTS +# GNU: General Public License v3.0 +################################################################################ +--- +- name: Remove Cloudplow | remove old cronjob + cron: + name: 'Cloudplow Clean' + user: 'root' + state: absent + +- name: Remove Cloudplow | directory + file: + state: absent + path: '/opt/appdata/cloudplow' + +- name: Remove Cloudplow | unused cronjob + cron: + state: absent + name: 'Cloudplow Clean' + user: 'root' + minute: '0' + hour: '0' + job: 'cd /opt/appdata/cloudplow && /usr/bin/python3 cloudplow.py clean'