torrent working

This commit is contained in:
2024-04-24 21:40:00 +12:00
parent afc0b57cfb
commit f068c9710b
9 changed files with 228 additions and 6 deletions

View File

@ -0,0 +1,35 @@
---
- name: Create downloads directory
ansible.builtin.file:
path: "{{ torrent_downloads_dir }}"
state: directory
owner: "{{ torrent_user }}"
group: "{{ torrent_user }}"
mode: "0775"
- name: Create qbittorrent config directory
ansible.builtin.file:
path: /etc/qbittorrent
state: directory
owner: "{{ torrent_user }}"
group: "{{ torrent_user }}"
mode: "0775"
- name: Template out the wireguard config
ansible.builtin.template:
dest: /etc/qbittorrent/wg0.conf
src: wireguard.conf.j2
owner: root
group: root
mode: "0600"
- name: Modprobe the wireguard module
community.general.modprobe:
name: wireguard
persistent: present
state: present
- name: Branch to Docker role
ansible.builtin.include_role:
name: docker

View File

@ -0,0 +1,11 @@
[Interface]
PrivateKey = {{ torrent_wireguard_private_key }}
Address = {{ torrent_wireguard_address }}/32
DNS = {{ torrent_wireguard_dns }}
MTU = 1420
[Peer]
PublicKey = {{ torrent_wireguard_peer_public_key }}
AllowedIPs = 0.0.0.0/0
Endpoint = {{ torrent_wireguard_peer_endpoint }}:51820
PersistentKeepalive = 25