2021-04-16 21:49:00 +01:00
|
|
|
- name: Install qbittorrent
|
|
|
|
package:
|
|
|
|
name: qbittorrent-nox
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Create user
|
|
|
|
user:
|
|
|
|
name: qbittorrent
|
|
|
|
system: true
|
|
|
|
become: true
|
|
|
|
register: qbittorrent_user
|
|
|
|
|
|
|
|
- name: Enable service
|
|
|
|
service:
|
|
|
|
name: qbittorrent-nox@{{ qbittorrent_user.name }}
|
|
|
|
enabled: true
|
|
|
|
become: true
|
|
|
|
|
|
|
|
- name: Set configuration
|
|
|
|
ini_file:
|
|
|
|
path: "{{ qbittorrent_user.home }}/.config/qBittorrent/qBittorrent.conf"
|
2023-06-15 15:16:19 +01:00
|
|
|
mode: "700"
|
2021-04-16 21:49:00 +01:00
|
|
|
owner: "{{ qbittorrent_user.name }}"
|
|
|
|
section: "{{ item.section }}"
|
|
|
|
option: "{{ item.option }}"
|
|
|
|
value: "{{ item.value }}"
|
|
|
|
no_extra_spaces: true
|
|
|
|
loop_control:
|
|
|
|
label: "{{ item.section }}.{{ item.option }}={{ item.value }}"
|
|
|
|
loop:
|
|
|
|
- {section: AutoRun, option: enabled, value: "false"}
|
|
|
|
- {section: LegalNotice, option: Accepted, value: "true"}
|
|
|
|
- {section: Preferences, option: Connection\UPnP, value: "false"}
|
2022-05-25 08:46:37 +01:00
|
|
|
- {section: Preferences, option: Downloads\SavePath, value: /mnt/media/temp/downloads}
|
2021-04-16 21:49:00 +01:00
|
|
|
- {section: Preferences, option: WebUI\Address, value: "*"}
|
|
|
|
- {section: Preferences, option: WebUI\ServerDomains, value: "*"}
|
|
|
|
- {section: Preferences, option: WebUI\Port, value: "8080"}
|
|
|
|
- {section: Preferences, option: WebUI\AuthSubnetWhitelist, value: 0.0.0.0/0}
|
|
|
|
- {section: Preferences, option: WebUI\AuthSubnetWhitelistEnabled, value: "true"}
|
|
|
|
- {section: Preferences, option: WebUI\LocalHostAuth, value: "false"}
|
|
|
|
- {section: Preferences, option: Bittorrent\MaxConnecs, value: -1"}
|
|
|
|
- {section: Preferences, option: Bittorrent\MaxConnecsPerTorrent, value: -1"}
|
|
|
|
- {section: Preferences, option: Bittorrent\MaxUploads, value: -1"}
|
|
|
|
- {section: Preferences, option: Bittorrent\MaxUploadsPerTorrent, value: -1"}
|
|
|
|
become: true
|
|
|
|
notify: restart qbittorrent
|