Update 2 files
- /roles/qbittorrent/tasks/main.yml - /roles/qbittorrent/templates/docker-compose.yml.j2
This commit is contained in:
parent
88af0262b4
commit
07e9e9c86a
@ -10,6 +10,43 @@
|
|||||||
- "{{ qbittorrent_downloads_dir }}"
|
- "{{ qbittorrent_downloads_dir }}"
|
||||||
tags: qbittorrent
|
tags: qbittorrent
|
||||||
|
|
||||||
|
- name: Create initial qBittorrent configuration
|
||||||
|
copy:
|
||||||
|
content: |
|
||||||
|
# Auto-generated qBittorrent configuration
|
||||||
|
[AutoRun]
|
||||||
|
enabled=false
|
||||||
|
|
||||||
|
[BitTorrent]
|
||||||
|
Session\DefaultSavePath=/downloads
|
||||||
|
Session\Port={{ qbittorrent_port_torrent }}
|
||||||
|
|
||||||
|
[Core]
|
||||||
|
AutoDeleteAddedTorrentFile=Never
|
||||||
|
|
||||||
|
[LegalNotice]
|
||||||
|
Accepted=true
|
||||||
|
|
||||||
|
[Preferences]
|
||||||
|
Connection\PortRangeMin={{ qbittorrent_port_torrent }}
|
||||||
|
Connection\PortRangeMax={{ qbittorrent_port_torrent }}
|
||||||
|
Downloads\SavePath=/downloads
|
||||||
|
Downloads\TempPath=/downloads/incomplete
|
||||||
|
WebUI\Address=*
|
||||||
|
WebUI\Port=8080
|
||||||
|
WebUI\LocalHostAuth=false
|
||||||
|
WebUI\AuthSubnetWhitelist=192.168.1.0/24
|
||||||
|
WebUI\UseUPnP=false
|
||||||
|
WebUI\ClickjackingProtection=false
|
||||||
|
WebUI\CSRFProtection=false
|
||||||
|
WebUI\HostHeaderValidation=false
|
||||||
|
WebUI\DomainList=192.168.1.201:{{ qbittorrent_port_webui }},localhost:{{ qbittorrent_port_webui }}
|
||||||
|
WebUI\MaxAuthenticationFailCount=-1
|
||||||
|
Advanced\RecheckOnCompletion=false
|
||||||
|
dest: "{{ qbittorrent_config_dir }}/qBittorrent.conf"
|
||||||
|
mode: '0644'
|
||||||
|
tags: qbittorrent
|
||||||
|
|
||||||
- name: Deploy docker-compose.yml
|
- name: Deploy docker-compose.yml
|
||||||
template:
|
template:
|
||||||
src: docker-compose.yml.j2
|
src: docker-compose.yml.j2
|
||||||
@ -25,6 +62,8 @@
|
|||||||
state: present
|
state: present
|
||||||
pull: "always"
|
pull: "always"
|
||||||
build: "never"
|
build: "never"
|
||||||
|
recreate: "always"
|
||||||
|
remove_orphans: yes
|
||||||
tags: qbittorrent
|
tags: qbittorrent
|
||||||
|
|
||||||
- name: Wait for qBittorrent to start
|
- name: Wait for qBittorrent to start
|
||||||
@ -34,13 +73,6 @@
|
|||||||
state: started
|
state: started
|
||||||
tags: qbittorrent
|
tags: qbittorrent
|
||||||
|
|
||||||
- name: Get temporary password from logs
|
|
||||||
shell: |
|
|
||||||
docker logs qbittorrent 2>&1 | grep "temporary password" | tail -1 | awk '{print $NF}'
|
|
||||||
register: temp_password
|
|
||||||
changed_when: false
|
|
||||||
tags: qbittorrent
|
|
||||||
|
|
||||||
- name: Display access information
|
- name: Display access information
|
||||||
debug:
|
debug:
|
||||||
msg: |
|
msg: |
|
||||||
@ -48,10 +80,9 @@
|
|||||||
|
|
||||||
🔗 Доступ: http://{{ ansible_host }}:{{ qbittorrent_port_webui }}
|
🔗 Доступ: http://{{ ansible_host }}:{{ qbittorrent_port_webui }}
|
||||||
👤 Имя пользователя: admin
|
👤 Имя пользователя: admin
|
||||||
🔑 Временный пароль: {{ temp_password.stdout }}
|
🔑 Пароль: adminadmin
|
||||||
|
|
||||||
⚠️ ВАЖНО: Войдите немедленно и смените пароль в веб-интерфейсе!
|
⚠️ ВАЖНО: Смените пароль после первого входа!
|
||||||
Этот временный пароль изменится при перезапуске контейнера.
|
|
||||||
|
|
||||||
📁 Директории:
|
📁 Директории:
|
||||||
- Конфигурация: {{ qbittorrent_config_dir }}
|
- Конфигурация: {{ qbittorrent_config_dir }}
|
||||||
|
|||||||
@ -8,14 +8,11 @@ services:
|
|||||||
- PGID={{ qbittorrent_pgid }}
|
- PGID={{ qbittorrent_pgid }}
|
||||||
- TZ={{ timezone }}
|
- TZ={{ timezone }}
|
||||||
- WEBUI_PORT=8080
|
- WEBUI_PORT=8080
|
||||||
- TORRENTING_PORT=6881
|
|
||||||
- WEBUI_USE_IP_HEADER=1
|
|
||||||
- WEBUI_HOST_HEADER=
|
|
||||||
volumes:
|
volumes:
|
||||||
- {{ qbittorrent_config_dir }}:/config
|
- {{ qbittorrent_config_dir }}:/config
|
||||||
- {{ qbittorrent_downloads_dir }}:/downloads
|
- {{ qbittorrent_downloads_dir }}:/downloads
|
||||||
ports:
|
ports:
|
||||||
- {{ qbittorrent_port_webui }}:8080
|
- {{ qbittorrent_port_webui }}:8080
|
||||||
- 6881:6881
|
- {{ qbittorrent_port_torrent }}:6881
|
||||||
- 6881:6881/udp
|
- {{ qbittorrent_port_torrent }}:6881/udp
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
Loading…
Reference in New Issue
Block a user