From 453fa4c16c36952bdb6507338ded276be454ba1d Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 13:00:59 -0400 Subject: [PATCH 01/10] Initial qbittorrent-vpn commit --- apps/qbittorrent-vpn.yml | 292 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 292 insertions(+) create mode 100644 apps/qbittorrent-vpn.yml diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml new file mode 100644 index 0000000..edb0d85 --- /dev/null +++ b/apps/qbittorrent-vpn.yml @@ -0,0 +1,292 @@ +#!/bin/bash +# +# Title: qBittorrent (with OpenVPN and Privoxy) +# Author(s): Mike Tzou (Chocobo1), Vladimir Golovnev (glassez), Diego Heras (ngosang), binhex +# URL: https://www.qbittorrent.org/ - https://github.com/binhex/arch-qbittorrentvpn +# GNU: General Public License v2.0 (w/ exception) +################################################################################ +--- +- hosts: localhost + gather_facts: false + tasks: + # FACTS ####################################################################### + + - name: 'Set Known Facts' + set_fact: + pgrole: 'qbittorrent' + intport: '8998' + extport: '8998' + intport1: '8118' + extport1: '8118' + intport2: '6881' + extport2: '6881' + dnsserver1: '1.1.1.1' + dnsserver2: '84.200.69.80' + dnsserver3: '37.235.1.174' + dnsserver4: '185.121.177.177' + image: 'binhex/arch-qbittorrentvpn:latest' + + # CORE (MANDATORY) ############################################################# + - name: 'Including cron job' + include_tasks: '/opt/coreapps/apps/_core.yml' + + - name: 'Including folders' + include_tasks: '/opt/coreapps/apps/_downloaders.yml' + + - name: 'Including plugins' + include_tasks: '/opt/coreapps/apps/_plugins.yml' + + # LABELS ###################################################################### + - name: 'Adding Traefik' + set_fact: + pg_labels: + traefik.frontend.auth.forward.address: '{{gauth}}' + traefik.enable: 'true' + traefik.port: '{{intport}}' + 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 PG ENV' + set_fact: + pg_env: + PUID: '1000' + PGID: '1000' + UMASK: '000' + VPN_ENABLED: 'no' + VPN_USER: 'username' + VPN_PASS: 'password' + VPN_PROV: 'custom' + VPN_OPTIONS: '--inactive 3600 --ping 10 --ping-exit 60' + STRICT_PORT_FORWARD: 'no' + ENABLE_PRIVOXY: 'no' + LAN_NETWORK: '127.20.0.0/16' + NAME_SERVERS: '{{dnsserver1}},{{dnsserver2}},{{dnsserver3}},{{dnsserver4}}' + DEBUG: 'false' + WEBUI_PORT: '{{intport}}' + + + + + # MAIN DEPLOYMENT ############################################################# + - name: 'Checking for existing app data' + stat: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + register: confcheck + + - name: 'Deploying {{pgrole}}' + docker_container: + name: '{{pgrole}}' + image: '{{image}}' + pull: yes + published_ports: + - '{{ports.stdout}}{{extport}}:{{intport}}' + volumes: '{{pg_volumes}}' + env: '{{pg_env}}' + restart_policy: unless-stopped + devices: + - '/dev/net/tun:/dev/net/tun:rwm' + dns_servers: + - '{{dnsserver1}}' + - '{{dnsserver2}}' + - '{{dnsserver3}}' + - '{{dnsserver4}}' + capabilities: + - NET_ADMIN + networks: + - name: plexguide + aliases: + - '{{pgrole}}' + state: started + labels: '{{pg_labels}}' + + # CONFIGURATION #################################################### + - name: 'Waiting for {{pgrole}} to initialize' + wait_for: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + state: present + timeout: 15 + delay: 5 + + - name: 'Stopping {{pgrole}}' + docker_container: + name: '{{pgrole}}' + state: stopped + + - name: Set SavePath + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Downloads\SavePath + value: '{{path.stdout}}/downloads/{{pgrole}}' + state: present + + + - name: Set TempPathEnabled + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Downloads\TempPathEnabled + value: True + state: present + + # FIRST TIME CONFIGURATION #################################################### + - name: 'Configuring {{pgrole}} for first time use' + block: + - name: Enable AutoRun + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: AutoRun + option: enabled + value: True + state: present + + - name: Enable Auto UnRar + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: AutoRun + option: program + value: '/usr/bin/unrar x -r \"%F/.\" \"%F/\"' + state: present + + - name: Disable DHT + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Bittorrent\DHT + value: false + state: present + + - name: Disable PeX + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Bittorrent\PeX + value: false + state: present + + - name: Disable LSD + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Bittorrent\LSD + value: false + state: present + + - name: Enable Encryption + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Bittorrent\Encryption + value: 1 + state: present + + - name: Don't use incomplete extension + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Downloads\UseIncompleteExtension + value: false + state: present + - name: Ignore slow torrents + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Queueing\IgnoreSlowTorrents + value: True + state: present + - name: Set MaxActiveDownloads + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Queueing\MaxActiveDownloads + value: 10 + state: present + - name: Set MaxActiveTorrents + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Queueing\MaxActiveTorrents + value: 100 + state: present + - name: Set MaxActiveUploads + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Queueing\MaxActiveUploads + value: 100 + state: present + - name: Set GlobalMaxSeedingMinutes + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: BitTorrent + option: Session\GlobalMaxSeedingMinutes + value: 20160 + state: present + - name: Set MaxRatio + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Bittorrent\MaxRatio + value: 1 + state: present + - name: pause on MaxRatioAction + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: Bittorrent\MaxRatioAction + value: 1 + state: present + - name: Disable csrf + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: WebUI\CSRFProtection + value: false + force: yes + state: present + - name: Disable HostHeaderValidation + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: WebUI\HostHeaderValidation + value: false + force: yes + state: present + - name: Disable ClickjackingProtection + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: WebUI\ClickjackingProtection + value: false + force: yes + state: present + + - name: Set ServerDomains + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: WebUI\ServerDomains + value: '*' + force: yes + state: present + - name: Set Address + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + section: Preferences + option: WebUI\Address + value: '*' + force: yes + state: present + + when: not confcheck.stat.exists + - name: Restart {{pgrole}} + docker_container: + name: '{{pgrole}}' + state: started \ No newline at end of file From 1b0cc0aa176d27cf685cd3f83bf4dd03eb593c69 Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 13:21:55 -0400 Subject: [PATCH 02/10] Update config path --- apps/qbittorrent-vpn.yml | 46 ++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index edb0d85..b84a794 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -77,7 +77,7 @@ # MAIN DEPLOYMENT ############################################################# - name: 'Checking for existing app data' stat: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' register: confcheck - name: 'Deploying {{pgrole}}' @@ -109,7 +109,7 @@ # CONFIGURATION #################################################### - name: 'Waiting for {{pgrole}} to initialize' wait_for: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' state: present timeout: 15 delay: 5 @@ -121,7 +121,7 @@ - name: Set SavePath ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Downloads\SavePath value: '{{path.stdout}}/downloads/{{pgrole}}' @@ -130,7 +130,7 @@ - name: Set TempPathEnabled ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Downloads\TempPathEnabled value: True @@ -141,7 +141,7 @@ block: - name: Enable AutoRun ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: AutoRun option: enabled value: True @@ -149,7 +149,7 @@ - name: Enable Auto UnRar ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: AutoRun option: program value: '/usr/bin/unrar x -r \"%F/.\" \"%F/\"' @@ -157,7 +157,7 @@ - name: Disable DHT ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Bittorrent\DHT value: false @@ -165,7 +165,7 @@ - name: Disable PeX ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Bittorrent\PeX value: false @@ -173,7 +173,7 @@ - name: Disable LSD ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Bittorrent\LSD value: false @@ -181,7 +181,7 @@ - name: Enable Encryption ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Bittorrent\Encryption value: 1 @@ -189,63 +189,63 @@ - name: Don't use incomplete extension ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Downloads\UseIncompleteExtension value: false state: present - name: Ignore slow torrents ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Queueing\IgnoreSlowTorrents value: True state: present - name: Set MaxActiveDownloads ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Queueing\MaxActiveDownloads value: 10 state: present - name: Set MaxActiveTorrents ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Queueing\MaxActiveTorrents value: 100 state: present - name: Set MaxActiveUploads ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Queueing\MaxActiveUploads value: 100 state: present - name: Set GlobalMaxSeedingMinutes ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: BitTorrent option: Session\GlobalMaxSeedingMinutes value: 20160 state: present - name: Set MaxRatio ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Bittorrent\MaxRatio value: 1 state: present - name: pause on MaxRatioAction ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: Bittorrent\MaxRatioAction value: 1 state: present - name: Disable csrf ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: WebUI\CSRFProtection value: false @@ -253,7 +253,7 @@ state: present - name: Disable HostHeaderValidation ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: WebUI\HostHeaderValidation value: false @@ -261,7 +261,7 @@ state: present - name: Disable ClickjackingProtection ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: WebUI\ClickjackingProtection value: false @@ -270,7 +270,7 @@ - name: Set ServerDomains ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: WebUI\ServerDomains value: '*' @@ -278,7 +278,7 @@ state: present - name: Set Address ini_file: - path: '/opt/appdata/{{pgrole}}/qBittorrent/qBittorrent.conf' + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' section: Preferences option: WebUI\Address value: '*' From e871e79fcd4693cfd8a7658e7c1d1a7ac5067c30 Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 14:40:32 -0400 Subject: [PATCH 03/10] Additional WebUI, blocklist config --- apps/qbittorrent-vpn.yml | 51 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index b84a794..46f70d5 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -87,6 +87,8 @@ pull: yes published_ports: - '{{ports.stdout}}{{extport}}:{{intport}}' + - '{{ports.stdout}}{{extport1}}:{{intport1}}' + - '{{ports.stdout}}{{extport2}}:{{intport2}}' volumes: '{{pg_volumes}}' env: '{{pg_env}}' restart_policy: unless-stopped @@ -136,6 +138,10 @@ value: True state: present + - name: Get latest blocklist + shell: /usr/bin/curl -L http://john.bitsurge.net/public/biglist.p2p.gz | /usr/bin/gzip -cdf > /config/qBittorrent/config/biglist.p2p + + # FIRST TIME CONFIGURATION #################################################### - name: 'Configuring {{pgrole}} for first time use' block: @@ -284,6 +290,51 @@ value: '*' force: yes state: present + + - name: Set Port + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' + section: Preferences + option: Connection\PortRangeMin + value: '{{intport2}}' + force: yes + state: present + + - name: Set torrent Watch folder + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' + section: Preferences + option: Downloads\ScanDirsV2 + value: '@Variant(\0\0\0\x1c\0\0\0\x1\0\0\0$\0/\0m\0n\0t\0/\0t\0o\0r\0r\0\x65\0n\0t\0/\0w\0\x61\0t\0\x63\0h\0\0\0\x2\0\0\0\0)' + force: yes + state: present + + - name: Set Blocklist enabled + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' + section: Preferences + option: IPFilter\Enabled + value: 'true' + force: yes + state: present + + - name: Set Blocklist location + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' + section: Preferences + option: IPFilter\File + value: '/config/qBittorrent/config/biglist.p2p' + force: yes + state: present + + - name: Set default login + ini_file: + path: '/opt/appdata/{{pgrole}}/qBittorrent/config/qBittorrent.conf' + section: Preferences + option: WebUI\Password_ha1 + value: '@ByteArray(22f616dbc8cdb4aa96105b1c8f36ea63)' + force: yes + state: present when: not confcheck.stat.exists - name: Restart {{pgrole}} From cb039c47f35f186a754b8119ff4263b13d3ae05e Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 14:42:34 -0400 Subject: [PATCH 04/10] Blocklist path update --- apps/qbittorrent-vpn.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index 46f70d5..8a7a93d 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -139,7 +139,7 @@ state: present - name: Get latest blocklist - shell: /usr/bin/curl -L http://john.bitsurge.net/public/biglist.p2p.gz | /usr/bin/gzip -cdf > /config/qBittorrent/config/biglist.p2p + shell: /usr/bin/curl -L http://john.bitsurge.net/public/biglist.p2p.gz | /usr/bin/gzip -cdf > /opt/appdata/{{pgrole}}/qBittorrent/config/biglist.p2p # FIRST TIME CONFIGURATION #################################################### From 23aec4d022b311af26906d3599c252a050ab8772 Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 14:46:42 -0400 Subject: [PATCH 05/10] Removed hardcoded exe location --- apps/qbittorrent-vpn.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index 8a7a93d..b160be6 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -139,7 +139,7 @@ state: present - name: Get latest blocklist - shell: /usr/bin/curl -L http://john.bitsurge.net/public/biglist.p2p.gz | /usr/bin/gzip -cdf > /opt/appdata/{{pgrole}}/qBittorrent/config/biglist.p2p + shell: curl -L http://john.bitsurge.net/public/biglist.p2p.gz | gzip -cdf > /opt/appdata/{{pgrole}}/qBittorrent/config/biglist.p2p # FIRST TIME CONFIGURATION #################################################### From 8e1f47c95e7dde9bc1f2c50f2985f0e21f1f6672 Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 15:08:04 -0400 Subject: [PATCH 06/10] Initialize ovpn folder --- apps/qbittorrent-vpn.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index b160be6..5fad3fd 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -140,6 +140,17 @@ - name: Get latest blocklist shell: curl -L http://john.bitsurge.net/public/biglist.p2p.gz | gzip -cdf > /opt/appdata/{{pgrole}}/qBittorrent/config/biglist.p2p + + - name: 'Checking for existing openvpn folder' + stat: + path: '/opt/appdata/{{pgrole}}/openvpn' + register: ovpncheck + + - name: Initialize opvn + block: + - name: Create opvn folder + shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OPVN\ files\ go\ here > && chown -R {{PUID}}:{{PGID}} /opt/appdata/{{pgrole}}/openvpn + when: not opvncheck.stat.exists # FIRST TIME CONFIGURATION #################################################### From 0d82d0ae93523fb109ee4efd3b5896497ef34d41 Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 15:11:23 -0400 Subject: [PATCH 07/10] Fix typo --- apps/qbittorrent-vpn.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index 5fad3fd..9aa131f 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -150,7 +150,7 @@ block: - name: Create opvn folder shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OPVN\ files\ go\ here > && chown -R {{PUID}}:{{PGID}} /opt/appdata/{{pgrole}}/openvpn - when: not opvncheck.stat.exists + when: not ovpncheck.stat.exists # FIRST TIME CONFIGURATION #################################################### From fd1aa0d61e407009d82c5fa19222616a4ac94d1e Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 15:16:24 -0400 Subject: [PATCH 08/10] Set puid,pgid as global attrib --- apps/qbittorrent-vpn.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index 9aa131f..38f132d 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -24,6 +24,8 @@ dnsserver2: '84.200.69.80' dnsserver3: '37.235.1.174' dnsserver4: '185.121.177.177' + puid: '1000' + pgid: '1000' image: 'binhex/arch-qbittorrentvpn:latest' # CORE (MANDATORY) ############################################################# @@ -56,8 +58,8 @@ - name: 'Setting PG ENV' set_fact: pg_env: - PUID: '1000' - PGID: '1000' + PUID: '{{puid}}' + PGID: '{{pgid}}' UMASK: '000' VPN_ENABLED: 'no' VPN_USER: 'username' @@ -149,7 +151,7 @@ - name: Initialize opvn block: - name: Create opvn folder - shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OPVN\ files\ go\ here > && chown -R {{PUID}}:{{PGID}} /opt/appdata/{{pgrole}}/openvpn + shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OPVN\ files\ go\ here > && chown -R {{puid}}:{{pgid}} /opt/appdata/{{pgrole}}/openvpn when: not ovpncheck.stat.exists From 8fa8512c20e86861e9206d2b3187ed7269124e17 Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 15:19:08 -0400 Subject: [PATCH 09/10] Fix typo --- apps/qbittorrent-vpn.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index 38f132d..bec102d 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -151,7 +151,7 @@ - name: Initialize opvn block: - name: Create opvn folder - shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OPVN\ files\ go\ here > && chown -R {{puid}}:{{pgid}} /opt/appdata/{{pgrole}}/openvpn + shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OPVN\ files\ go\ here && chown -R {{puid}}:{{pgid}} /opt/appdata/{{pgrole}}/openvpn when: not ovpncheck.stat.exists From fe9df6d4e23037195905379825f75161303cea76 Mon Sep 17 00:00:00 2001 From: ChaosZero112 Date: Sat, 15 Jun 2019 17:46:13 -0400 Subject: [PATCH 10/10] Removed VPN Options as they could conflict with some configurations --- apps/qbittorrent-vpn.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/qbittorrent-vpn.yml b/apps/qbittorrent-vpn.yml index bec102d..5c4e955 100644 --- a/apps/qbittorrent-vpn.yml +++ b/apps/qbittorrent-vpn.yml @@ -65,7 +65,7 @@ VPN_USER: 'username' VPN_PASS: 'password' VPN_PROV: 'custom' - VPN_OPTIONS: '--inactive 3600 --ping 10 --ping-exit 60' + VPN_OPTIONS: '' STRICT_PORT_FORWARD: 'no' ENABLE_PRIVOXY: 'no' LAN_NETWORK: '127.20.0.0/16' @@ -151,7 +151,7 @@ - name: Initialize opvn block: - name: Create opvn folder - shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OPVN\ files\ go\ here && chown -R {{puid}}:{{pgid}} /opt/appdata/{{pgrole}}/openvpn + shell: mkdir /opt/appdata/{{pgrole}}/openvpn && touch mkdir /opt/appdata/{{pgrole}}/openvpn/OVPN\ files\ go\ here && chown -R {{puid}}:{{pgid}} /opt/appdata/{{pgrole}}/openvpn when: not ovpncheck.stat.exists