2017-08-28 15:31:54 +00:00
|
|
|
---
|
|
|
|
- name: Create Transmission Directories
|
|
|
|
file:
|
|
|
|
path: "{{ item }}"
|
|
|
|
state: directory
|
|
|
|
# mode: 0755
|
|
|
|
with_items:
|
|
|
|
- "{{ transmission_config_directory }}"
|
|
|
|
- "{{ transmission_download_directory }}"
|
|
|
|
- "{{ transmission_watch_directory }}"
|
|
|
|
|
|
|
|
- name: Transmission with VPN
|
|
|
|
docker_container:
|
|
|
|
name: transmission-openvpn
|
|
|
|
image: haugene/transmission-openvpn
|
|
|
|
pull: true
|
|
|
|
volumes:
|
|
|
|
- "/etc/localtime:/etc/localtime:ro"
|
2020-03-26 10:33:10 +00:00
|
|
|
- "{{ transmission_download_directory }}:/downloads:rw"
|
2017-08-28 15:31:54 +00:00
|
|
|
- "{{ transmission_config_directory }}:/config:rw"
|
2020-03-26 10:33:10 +00:00
|
|
|
- "{{ transmission_watch_directory }}:/watch:rw"
|
2017-08-28 15:31:54 +00:00
|
|
|
- "/etc/timezone:/etc/timezone:ro"
|
|
|
|
ports:
|
2020-01-05 21:47:40 +00:00
|
|
|
- "{{ transmission_openvpn_webui_port }}:9091"
|
|
|
|
- "{{ transmission_openvpn_external_port }}:51413"
|
2020-05-05 21:46:34 +00:00
|
|
|
- "{{ transmission_openvpn_external_port }}:51413/udp"
|
2020-03-26 10:33:10 +00:00
|
|
|
- "{{ transmission_openvpn_proxy_port }}:3128"
|
2017-08-28 15:31:54 +00:00
|
|
|
env:
|
2019-07-03 22:00:56 +00:00
|
|
|
TRANSMISSION_HOME: "/config"
|
2020-03-26 10:33:10 +00:00
|
|
|
TRANSMISSION_DOWNLOAD_DIR: "/downloads"
|
|
|
|
TRANSMISSION_INCOMPLETE_DIR: "/downloads/.incomplete"
|
|
|
|
TRANSMISSION_WATCH_DIR: "/watch"
|
|
|
|
TRANSMISSION_RATIO_LIMIT: "{{ transmission_openvpn_ratio_limit }}"
|
|
|
|
TRANSMISSION_RATIO_LIMIT_ENABLED: "{{ transmission_openvpn_ratio_limit_enabled }}"
|
2017-08-28 15:31:54 +00:00
|
|
|
OPENVPN_PROVIDER: "{{ openvpn_provider }}"
|
|
|
|
OPENVPN_USERNAME: "{{ openvpn_username }}"
|
|
|
|
OPENVPN_PASSWORD: "{{ openvpn_password }}"
|
|
|
|
OPENVPN_CONFIG: "{{ openvpn_config }}"
|
2020-03-26 10:33:10 +00:00
|
|
|
WEBPROXY_ENABLED: "true"
|
|
|
|
WEBPROXY_PORT: "3128"
|
2021-01-13 15:19:47 +00:00
|
|
|
PUID: "{{ transmission_openvpn_user_id }}"
|
|
|
|
PGID: "{{ transmission_openvpn_group_id }}"
|
|
|
|
LOCAL_NETWORK: "{{ transmission_openvpn_local_network }}"
|
2019-07-03 22:00:56 +00:00
|
|
|
ENABLE_UFW: "false"
|
2017-08-28 15:31:54 +00:00
|
|
|
devices:
|
|
|
|
- /dev/net/tun
|
|
|
|
capabilities:
|
|
|
|
- NET_ADMIN
|
|
|
|
restart_policy: unless-stopped
|
2021-02-23 15:16:29 +00:00
|
|
|
memory: "{{ transmission_openvpn_memory }}"
|
2019-04-11 22:03:11 +00:00
|
|
|
labels:
|
2021-01-19 17:18:12 +00:00
|
|
|
traefik.enable: "{{ transmission_openvpn_available_externally }}"
|
|
|
|
traefik.http.routers.transmission_openvpn.rule: "Host(`{{ transmission_openvpn_hostname }}.{{ ansible_nas_domain }}`)"
|
|
|
|
traefik.http.routers.transmission_openvpn.tls.certresolver: "letsencrypt"
|
|
|
|
traefik.http.routers.transmission_openvpn.tls.domains[0].main: "{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.routers.transmission_openvpn.tls.domains[0].sans: "*.{{ ansible_nas_domain }}"
|
|
|
|
traefik.http.services.transmission_openvpn.loadbalancer.server.port: "9091"
|