mirror of
https://github.com/davestephens/ansible-nas
synced 2024-12-28 20:43:11 +00:00
3da19e5708
* Rejig of playbook to load roles from ansible-galaxy * Remove ansible-nas role and move tasks to tasks directory * Add InfluxDB/Telegraf/Grafana for monitoring & dashboards * Automatically configure InfluxDB as a datasource in Grafana * Switch to ZFS Docker driver * Add note about switching to overlay2 Docker driver if required
46 lines
1.4 KiB
YAML
46 lines
1.4 KiB
YAML
---
|
|
- include_vars: group_vars/vpn_credentials.yml
|
|
|
|
- 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"
|
|
- "{{ transmission_download_directory }}:/storage/downloads:rw"
|
|
- "{{ transmission_config_directory }}:/config:rw"
|
|
- "{{ transmission_watch_directory }}:/storage/watch:rw"
|
|
- "/etc/timezone:/etc/timezone:ro"
|
|
ports:
|
|
- "9091:9091"
|
|
- "51413:51413"
|
|
env:
|
|
TRANSMISSION_HOME: /config
|
|
TRANSMISSION_DOWNLOAD_DIR: /storage/downloads/complete
|
|
TRANSMISSION_INCOMPLETE_DIR: /storage/downloads/incomplete
|
|
TRANSMISSION_WATCH_DIR: /storage/watch
|
|
OPENVPN_PROVIDER: "{{ openvpn_provider }}"
|
|
OPENVPN_USERNAME: "{{ openvpn_username }}"
|
|
OPENVPN_PASSWORD: "{{ openvpn_password }}"
|
|
OPENVPN_CONFIG: "{{ openvpn_config }}"
|
|
PUID: "{{ transmission_user_id }}"
|
|
PGID: "{{ transmission_group_id }}"
|
|
LOCAL_NETWORK: "{{ transmission_local_network }}"
|
|
ENABLE_UFW: false
|
|
devices:
|
|
- /dev/net/tun
|
|
capabilities:
|
|
- NET_ADMIN
|
|
restart_policy: unless-stopped
|
|
memory: 1g
|