-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtorrent.yml
68 lines (56 loc) · 1.85 KB
/
torrent.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
- name: Apply Proxmox config
hosts: pve
vars_files:
- vars.yml
- private-vars.yml
roles:
- role: tychobrouwer.lxc_mount
lxc_mount_is_lxc: false
lxc_mount_mounts:
- { src: /rpool-main/media-share/Torrents, dest: /share/media-share/Torrents }
lxc_mount_lxc_id: 104
- name: Add lxc config entries for VPN
ansible.builtin.lineinfile:
path: /etc/pve/lxc/{{ item[0] }}.conf
line: "{{ item[1] }}"
regexp: "^{{ item[1] }}"
loop:
- [ "104", "lxc.cgroup2.devices.allow: c 10:200 rwm" ]
- [ "104", "lxc.mount.entry: /dev/net dev/net none bind,create=dir"]
- name: Install qBittorrent
hosts: torrent
vars_files:
- vars.yml
- private-vars.yml
roles:
- role: tychobrouwer.ssh
- role: tychobrouwer.nordvpn
nordvpn_server: nl900.nordvpn.com.udp1194
- role: tychobrouwer.qbittorrent_nox
qbittorrent_nox_user_name: qbittorrent
qbittorrent_nox_torrent_path: /share/media-share/Torrents
- role: tychobrouwer.lxc_mount
lxc_mount_is_lxc: true
lxc_mount_mounts:
- { src: /rpool-main/media-share/Torrents, dest: /share/media-share/Torrents }
lxc_mount_lxc_id: 104
lxc_mount_users: [qbittorrent]
tasks:
- name: Create qBittorrent service override directory
ansible.builtin.file:
path: /etc/systemd/system/qbittorrent.service.d
state: directory
- name: Start qBittorrent after openvpn
ansible.builtin.copy:
dest: /etc/systemd/system/qbittorrent.service.d/after-openvpn.service
content: |
[Unit]
mode: 0755
- name: Set journald log size
ansible.builtin.lineinfile:
path: /etc/systemd/journald.conf
line: SystemMaxUse=512M
regexp: ^SystemMaxUse=
insertafter: "[Journal]"