mirror of
https://github.com/mtan93/Apps-Community.git
synced 2026-03-08 05:31:59 +00:00
Removed alt. port, added rss template, stopped container when finished, misc.
This commit is contained in:
@@ -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
|
||||
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
|
||||
Reference in New Issue
Block a user