From 7fc787941510c032c7443ce95ebf9ab031d9c100 Mon Sep 17 00:00:00 2001 From: Admin9705 <24727006+Admin9705@users.noreply.github.com> Date: Sun, 24 Feb 2019 18:08:02 -0500 Subject: [PATCH 01/13] Update _core.yml --- apps/_core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/_core.yml b/apps/_core.yml index c21e982..3051063 100644 --- a/apps/_core.yml +++ b/apps/_core.yml @@ -113,7 +113,7 @@ # FOR AUTHENTICATION - name: 'Script Execute Part I' - shell: 'bash /opt/plexguide/menu/pgshield/drop.sh' + shell: 'bash /opt/pgshield/drop.sh' - name: 'Script Execute Part II' shell: 'cat /var/plexguide/auth.var' From 2cc70ade43dc2e2b0353d7b75d8b807619f74164 Mon Sep 17 00:00:00 2001 From: Admin9705 <24727006+Admin9705@users.noreply.github.com> Date: Sun, 24 Feb 2019 18:29:59 -0500 Subject: [PATCH 02/13] restore --- apps/_core.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/_core.yml b/apps/_core.yml index 3051063..51fcb4a 100644 --- a/apps/_core.yml +++ b/apps/_core.yml @@ -113,7 +113,7 @@ # FOR AUTHENTICATION - name: 'Script Execute Part I' - shell: 'bash /opt/pgshield/drop.sh' + shell: 'bash /opt/pgshield/menu/pgshield/drop.sh' - name: 'Script Execute Part II' shell: 'cat /var/plexguide/auth.var' From f87fd636538e789df29a2312a3070c8873dce175 Mon Sep 17 00:00:00 2001 From: MrDoobPG <46342172+MrDoobPG@users.noreply.github.com> Date: Wed, 27 Feb 2019 16:19:57 +0100 Subject: [PATCH 03/13] upload dockergc moved from Core to Community-Apps Fix paths included --- apps/dockergc.yml | 64 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 apps/dockergc.yml diff --git a/apps/dockergc.yml b/apps/dockergc.yml new file mode 100644 index 0000000..b8a1ed6 --- /dev/null +++ b/apps/dockergc.yml @@ -0,0 +1,64 @@ +#!/bin/bash +# +# Title: PlexGuide (Reference Title File) +# Author(s): Admin9705 +# URL: https://plexguide.com - http://github.plexguide.com +# GNU: General Public License v3.0 +################################################################################ +--- +- hosts: localhost + gather_facts: false + tasks: + # FACTS ####################################################################### + - name: 'Set Known Facts' + set_fact: + pgrole: 'dockergc' + intport: '1' + extport: '1' + image: 'clockworksoul/docker-gc-cron' + + # CORE (MANDATORY) ############################################################ + - name: 'Including cron job' + include_tasks: '/opt/communityapps/apps/_core.yml' + + # MANDATORY DOCKERGC ########################################################## + - name: Install docker-gc-exclude + template: + src: /opt/communityapps/apps/templates/docker-gc-exclude + dest: /opt/appdata/{{pgrole}}/docker-gc-exclude + force: yes + mode: 0775 + owner: '1000' + group: '1000' + + # LABELS ###################################################################### + - name: 'Setting PG Volumes' + set_fact: + pg_volumes: + - /opt/appdata/dockergc/docker-gc-exclude:/etc/docker-gc-exclude + - /var/run/docker.sock:/var/run/docker.sock + - /etc/localtime:/etc/localtime:ro + + - name: 'Setting PG ENV' + set_fact: + pg_env: + PUID: '1000' + PGID: '1000' + CLEAN_UP_VOLUMES: 1 + + # MAIN DEPLOYMENT ############################################################# + - name: 'Deploying {{pgrole}}' + docker_container: + name: '{{pgrole}}' + image: '{{image}}' + pull: yes + volumes: '{{pg_volumes}}' + env: '{{pg_env}}' + restart_policy: unless-stopped + networks: + - name: plexguide + aliases: + - '{{pgrole}}' + state: started + labels: + traefik.enabled: 'false' From a1da81f21abfce6477758ecdc3c3faf17a4de1eb Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 28 Feb 2019 20:03:30 -0500 Subject: [PATCH 04/13] Initial Transmissionbt commit --- apps/transmission.yml | 111 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 111 insertions(+) create mode 100644 apps/transmission.yml diff --git a/apps/transmission.yml b/apps/transmission.yml new file mode 100644 index 0000000..9fa0bc2 --- /dev/null +++ b/apps/transmission.yml @@ -0,0 +1,111 @@ +#!/bin/bash +# +# Title: Transmissionbt (with OpenVPN, WebProxy, RSS) +# Author(s): Eric Petit, Josh Elsasser, Bryan Varner, Charles Kerr, Kristian Haugene, nning +# URL: https://transmissionbt.com/ - https://github.com/haugene/docker-transmission-openvpn +# GNU: General Public License v2.0, v3.0 +################################################################################ +--- +- hosts: localhost + gather_facts: false + tasks: + # FACTS ####################################################################### + - name: 'Set Known Facts' + set_fact: + pgrole: 'transmission' + pgrole2: 'transmission-rss' + intport: '9091' + extport: '9091' + intport2: '9092' + extport2: '9092' + intport3: '8888' + extport3: '8888' + image: 'haugene/transmission-openvpn:latest' + image2: 'haugene/transmission-rss:latest' + + # CORE (MANDATORY) ############################################################ + - name: 'Including cron job' + include_tasks: '/opt/communityapps/apps/_core.yml' + + # LABELS ###################################################################### + - name: 'Adding Traefik' + set_fact: + pg_labels: + traefik.enable: 'true' + traefik.port: '{{intport}}' + traefik.frontend.auth.forward.address: '{{gauth}}' + traefik.frontend.rule: 'Host:{{pgrole}}.{{domain.stdout}},{{tldset}}' + + - name: 'Setting PG Volumes' + set_fact: + pg_volumes: + - '/etc/localtime:/etc/localtime:ro' + - '/opt/appdata/{{pgrole}}:/config' + - '{{path.stdout}}:{{path.stdout}}' + - '/mnt:/mnt' + + - name: 'Setting {{pgrole}} ENV' + set_fact: + pg_env: + PUID: '1000' + PGID: '1000' + OPENVPN_PROVIDER: 'see https://git.io/fpCSF' + OPENVPN_CONFIG: 'see https://git.io/fpCSF' + OPENVPN_USERNAME: 'vpnuser' + OPENVPN_PASSWORD: 'vpnpass' + OPENVPN_OPTS: '--inactive 3600 --ping 10 --ping-exit 60' + WEBPROXY_ENABLED: 'true' + WEBPROXY_PORT: '{{extport3}}' + LOCAL_NETWORK: 172.18.0.0/24 + TRANSMISSION_WEB_HOME: '/config/webui-theme' + TRANSMISSION_WEB_UI: 'combustion' + TRANSMISSION_BLOCKLIST_ENABLED: 'true' + TRANSMISSION_BLOCKLIST_URL: 'http://john.bitsurge.net/public/biglist.p2p.gz' + TRANSMISSION_DHT_ENABLED: 'false' + TRANSMISSION_DOWNLOAD_DIR: '/mnt/downloads/{{pgrole}}' + TRANSMISSION_INCOMPLETE_DIR: '/mnt/incomplete/{{pgrole}}' + TRANSMISSION_RPC_PORT: '{{intport2}}' + TRANSMISSION_WATCH_DIR: '/config/watch' + TRANSMISSION_WATCH_DIR_ENABLED: 'false' + + - name: 'Setting {{pgrole2}} ENV' + set_fact: + pg_env2: + RSS_URL: 'http://your.rss' + + # MAIN DEPLOYMENT ############################################################# + - name: 'Deploying {{pgrole}}' + docker_container: + name: '{{pgrole}}' + image: '{{image}}' + pull: yes + published_ports: + - '{{ports.stdout}}{{extport}}:{{intport}}' + - '{{ports.stdout}}{{extport2}}:{{intport2}}' + - '{{ports.stdout}}{{extport3}}:{{intport3}}' + volumes: '{{pg_volumes}}' + env: '{{pg_env}}' + restart_policy: unless-stopped + capabilities: + - NET-ADMIN + networks: + - name: plexguide + aliases: + - '{{pgrole}}' + state: started + labels: '{{pg_labels}}' + + - name: 'Deploying {{pgrole2}}' + docker_container: + name: '{{pgrole2}}' + image: '{{image2}}' + pull: yes + env: '{{pg_env2}}' + links: + - '{{pgrole}}:transmission' + restart_policy: unless-stopped + networks: + - name: plexguide + aliases: + - '{{pgrole2}}' + state: started \ No newline at end of file From 4e5925502bd5c62e07fa645902225ad41705866c Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 28 Feb 2019 21:22:27 -0500 Subject: [PATCH 05/13] Fixed typo --- apps/transmission.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index 9fa0bc2..da2021a 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -87,7 +87,7 @@ env: '{{pg_env}}' restart_policy: unless-stopped capabilities: - - NET-ADMIN + - NET_ADMIN networks: - name: plexguide aliases: From 9cda9e101184342c6346de6dca82314013ffa258 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 28 Feb 2019 23:19:35 -0500 Subject: [PATCH 06/13] Removed alt. port, added rss template, stopped container when finished, misc. --- apps/transmission.yml | 66 ++++++++++++++++++++++++++++++++----------- 1 file changed, 49 insertions(+), 17 deletions(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index da2021a..f7787c5 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -16,10 +16,8 @@ pgrole2: 'transmission-rss' intport: '9091' extport: '9091' - intport2: '9092' - extport2: '9092' - intport3: '8888' - extport3: '8888' + intport2: '8888' + extport2: '8888' image: 'haugene/transmission-openvpn:latest' image2: 'haugene/transmission-rss:latest' @@ -27,6 +25,16 @@ - name: 'Including cron job' include_tasks: '/opt/communityapps/apps/_core.yml' + - name: Checking for existing rss config + stat: + path: "/opt/appdata/{{pgrole}}/rss/transmission-rss.conf" + register: rsscheck + + #- name: Checking for existing blocklist + # stat: + # path: "/opt/appdata/{{pgrole}}/home/biglist.p2p" + # register: blcheck + # LABELS ###################################################################### - name: 'Adding Traefik' set_fact: @@ -44,34 +52,42 @@ - '{{path.stdout}}:{{path.stdout}}' - '/mnt:/mnt' + - name: 'Setting {{pgrole2}} Volumes' + set_facts: + pg_volumes2: + - '/opt/appdata/{{pgrole}}/rss:/etc/transmission-rss.conf:ro' + - name: 'Setting {{pgrole}} ENV' set_fact: pg_env: PUID: '1000' PGID: '1000' - OPENVPN_PROVIDER: 'see https://git.io/fpCSF' - OPENVPN_CONFIG: 'see https://git.io/fpCSF' + OPENVPN_PROVIDER: 'see available configs at https://git.io/fpCSF' + OPENVPN_CONFIG: 'see available configs at https://git.io/fpCSF' OPENVPN_USERNAME: 'vpnuser' OPENVPN_PASSWORD: 'vpnpass' OPENVPN_OPTS: '--inactive 3600 --ping 10 --ping-exit 60' + CREATE_TUN_DEVICE: 'true' WEBPROXY_ENABLED: 'true' - WEBPROXY_PORT: '{{extport3}}' - LOCAL_NETWORK: 172.18.0.0/24 + WEBPROXY_PORT: '{{extport2}}' + LOCAL_NETWORK: 192.168.0.0/24 TRANSMISSION_WEB_HOME: '/config/webui-theme' - TRANSMISSION_WEB_UI: 'combustion' + TRANSMISSION_WEB_UI: 'transmission-web-control' TRANSMISSION_BLOCKLIST_ENABLED: 'true' TRANSMISSION_BLOCKLIST_URL: 'http://john.bitsurge.net/public/biglist.p2p.gz' TRANSMISSION_DHT_ENABLED: 'false' TRANSMISSION_DOWNLOAD_DIR: '/mnt/downloads/{{pgrole}}' TRANSMISSION_INCOMPLETE_DIR: '/mnt/incomplete/{{pgrole}}' - TRANSMISSION_RPC_PORT: '{{intport2}}' + TRANSMISSION_RPC_PORT: '{{intport}}' TRANSMISSION_WATCH_DIR: '/config/watch' TRANSMISSION_WATCH_DIR_ENABLED: 'false' + TRANSMISSION_HOME: '/config/home' - name: 'Setting {{pgrole2}} ENV' set_fact: pg_env2: - RSS_URL: 'http://your.rss' + TRANSMISSION_DOWNLOAD_DIR: '/mnt/downloads/{{pgrole}}' + RSS_URL: 'hxxp://your.rss' # MAIN DEPLOYMENT ############################################################# - name: 'Deploying {{pgrole}}' @@ -82,10 +98,11 @@ published_ports: - '{{ports.stdout}}{{extport}}:{{intport}}' - '{{ports.stdout}}{{extport2}}:{{intport2}}' - - '{{ports.stdout}}{{extport3}}:{{intport3}}' volumes: '{{pg_volumes}}' env: '{{pg_env}}' restart_policy: unless-stopped + devices: + - '/dev/net/tun:/dev/net/tun:rwm' capabilities: - NET_ADMIN networks: @@ -95,17 +112,32 @@ state: started labels: '{{pg_labels}}' + #- name: 'Downloading blocklist' + # block: + # shell: "curl -s http://john.bitsurge.net/public/biglist.p2p.gz | gunzip > /config/home/biglist.p2p" + # when: not blcheck.stat.exists + + - name: 'Creating RSS feed configuration' + block: + shell: "touch /etc/transmission-rss.conf && chown 1000:1000 /etc/transmission-rss.conf && echo see https://git.io/fhAm2 to configure > /etc/transmission-rss.conf" + when: not rsscheck.stat.exists + - name: 'Deploying {{pgrole2}}' docker_container: name: '{{pgrole2}}' image: '{{image2}}' pull: yes + volumes: '{{pg_volumes2}}' env: '{{pg_env2}}' links: - '{{pgrole}}:transmission' restart_policy: unless-stopped - networks: - - name: plexguide - aliases: - - '{{pgrole2}}' - state: started \ No newline at end of file + state: started + + - name: 'Wait for {{pgrole}} to initialize' + - wait_for: timeout=30 + + - name: 'Stopping {{pgrole}}. Go configure ENV values.' + docker_container: + name: '{{pgrole}}' + state: stopped \ No newline at end of file From 6c41135d2cf55a3b04ed82f7a65609e2725dd323 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 28 Feb 2019 23:25:09 -0500 Subject: [PATCH 07/13] Fixed yaml typo --- apps/transmission.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index f7787c5..b8fe665 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -135,7 +135,7 @@ state: started - name: 'Wait for {{pgrole}} to initialize' - - wait_for: timeout=30 + wait_for: timeout=30 - name: 'Stopping {{pgrole}}. Go configure ENV values.' docker_container: From 4cf9eb93e0c2bbc723b67c104f340ef7b9d33790 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 28 Feb 2019 23:31:13 -0500 Subject: [PATCH 08/13] Fix for real this time... --- apps/transmission.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index b8fe665..df565e8 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -52,7 +52,7 @@ - '{{path.stdout}}:{{path.stdout}}' - '/mnt:/mnt' - - name: 'Setting {{pgrole2}} Volumes' + - name: 'Setting additional volumes' set_facts: pg_volumes2: - '/opt/appdata/{{pgrole}}/rss:/etc/transmission-rss.conf:ro' From 361d6e4dc312af9aebb4dbc8b286873964c2b198 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 28 Feb 2019 23:33:44 -0500 Subject: [PATCH 09/13] Third time's a charm... --- apps/transmission.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index df565e8..393cf6a 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -52,8 +52,8 @@ - '{{path.stdout}}:{{path.stdout}}' - '/mnt:/mnt' - - name: 'Setting additional volumes' - set_facts: + - name: 'Setting {{pgrole2}} Volumes' + set_fact: pg_volumes2: - '/opt/appdata/{{pgrole}}/rss:/etc/transmission-rss.conf:ro' From ec742ab4a08c39488366549f464406ed25192231 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 28 Feb 2019 23:39:27 -0500 Subject: [PATCH 10/13] Fix RSS config step --- apps/transmission.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index 393cf6a..dac9fbd 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -117,9 +117,10 @@ # shell: "curl -s http://john.bitsurge.net/public/biglist.p2p.gz | gunzip > /config/home/biglist.p2p" # when: not blcheck.stat.exists - - name: 'Creating RSS feed configuration' + - name: 'RSS feed configuration' block: - shell: "touch /etc/transmission-rss.conf && chown 1000:1000 /etc/transmission-rss.conf && echo see https://git.io/fhAm2 to configure > /etc/transmission-rss.conf" + - name: 'Creating configuration' + shell: "touch /etc/transmission-rss.conf && chown 1000:1000 /etc/transmission-rss.conf && echo see https://git.io/fhAm2 to configure > /etc/transmission-rss.conf" when: not rsscheck.stat.exists - name: 'Deploying {{pgrole2}}' From 6cb6447e9fa6b9f854a8c5fa35a1723994a9ec0c Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 1 Mar 2019 00:01:47 -0500 Subject: [PATCH 11/13] Fixed RSS deployment --- apps/transmission.yml | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index dac9fbd..bd8cc85 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -25,10 +25,15 @@ - name: 'Including cron job' include_tasks: '/opt/communityapps/apps/_core.yml' + - name: Checking for existing rss folder + stat: + path: "/opt/appdata/{{pgrole}}/rss" + register: rsscheck + - name: Checking for existing rss config stat: path: "/opt/appdata/{{pgrole}}/rss/transmission-rss.conf" - register: rsscheck + register: cfgcheck #- name: Checking for existing blocklist # stat: @@ -117,12 +122,18 @@ # shell: "curl -s http://john.bitsurge.net/public/biglist.p2p.gz | gunzip > /config/home/biglist.p2p" # when: not blcheck.stat.exists - - name: 'RSS feed configuration' + - name: 'RSS feed configuration - Folder' block: - - name: 'Creating configuration' - shell: "touch /etc/transmission-rss.conf && chown 1000:1000 /etc/transmission-rss.conf && echo see https://git.io/fhAm2 to configure > /etc/transmission-rss.conf" + - name: 'Creating RSS folder' + shell: "mkdir /opt/appdata/{{pgrole}}/rss" when: not rsscheck.stat.exists + - name: 'RSS feed configuration - Config' + block: + - name: 'Creating configuration file' + shell: "touch /opt/appdata/{{pgrole}}/rss/transmission-rss.conf && chown -R 1000:1000 /opt/appdata/{{pgrole}}/rss/ && echo see https://git.io/fhAm2 to configure > /opt/appdata/{{pgrole}}/rss/transmission-rss.conf" + when: not cfgcheck.stat.exists + - name: 'Deploying {{pgrole2}}' docker_container: name: '{{pgrole2}}' From 1196a0b53fee6f9f1b2eeeb2712c28ae36e2b790 Mon Sep 17 00:00:00 2001 From: Cody Date: Fri, 1 Mar 2019 00:13:00 -0500 Subject: [PATCH 12/13] Fix for volume mnt --- apps/transmission.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index bd8cc85..f2fb9c0 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -60,7 +60,7 @@ - name: 'Setting {{pgrole2}} Volumes' set_fact: pg_volumes2: - - '/opt/appdata/{{pgrole}}/rss:/etc/transmission-rss.conf:ro' + - '/opt/appdata/{{pgrole}}/rss/transmission-rss.conf:/etc/transmission-rss.conf:ro' - name: 'Setting {{pgrole}} ENV' set_fact: @@ -92,7 +92,7 @@ set_fact: pg_env2: TRANSMISSION_DOWNLOAD_DIR: '/mnt/downloads/{{pgrole}}' - RSS_URL: 'hxxp://your.rss' + RSS_URL: 'hxxp://unused' # MAIN DEPLOYMENT ############################################################# - name: 'Deploying {{pgrole}}' From 530efdb441563950f3188500a75ff12660ac5cb3 Mon Sep 17 00:00:00 2001 From: Cody Date: Mon, 4 Mar 2019 01:12:44 -0500 Subject: [PATCH 13/13] Update transmission.yml Removed commented blocks. --- apps/transmission.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/apps/transmission.yml b/apps/transmission.yml index f2fb9c0..67c1086 100644 --- a/apps/transmission.yml +++ b/apps/transmission.yml @@ -35,11 +35,6 @@ path: "/opt/appdata/{{pgrole}}/rss/transmission-rss.conf" register: cfgcheck - #- name: Checking for existing blocklist - # stat: - # path: "/opt/appdata/{{pgrole}}/home/biglist.p2p" - # register: blcheck - # LABELS ###################################################################### - name: 'Adding Traefik' set_fact: @@ -117,11 +112,6 @@ state: started labels: '{{pg_labels}}' - #- name: 'Downloading blocklist' - # block: - # shell: "curl -s http://john.bitsurge.net/public/biglist.p2p.gz | gunzip > /config/home/biglist.p2p" - # when: not blcheck.stat.exists - - name: 'RSS feed configuration - Folder' block: - name: 'Creating RSS folder' @@ -152,4 +142,4 @@ - name: 'Stopping {{pgrole}}. Go configure ENV values.' docker_container: name: '{{pgrole}}' - state: stopped \ No newline at end of file + state: stopped