Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main.yml rutorrent #47

Open
wants to merge 1 commit into
base: v8.6
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions apps/templates/rutorrent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@
line: 'execute = {sh,-c,/usr/bin/php7 /app/rutorrent/php/initplugins.php abc &}'
state: present

- name: Set download location || /mnt/incomplete/rutorrent
- name: Set download location || {{path.stdout}}/incomplete/rutorrent
lineinfile:
path: '/opt/appdata/{{pgrole}}/rtorrent/rtorrent.rc'
regexp: '#*directory.default.set\s*=.*'
line: 'directory.default.set = /mnt/incomplete/rutorrent'
line: 'directory.default.set = {{path.stdout}}/incomplete/rutorrent'
state: present

- name: Set download completed move location to /mnt/downloads/torrent
- name: Set download completed move location to {{path.stdout}}/downloads/torrent
lineinfile:
path: "/opt/appdata/{{pgrole}}/rtorrent/rtorrent.rc"
regexp: '#*method.insert\s*=\s*d.get_finished_dir.*'
line: 'method.insert = d.get_finished_dir, simple, "cat=/mnt/downloads/rutorrent/,$d.custom1="'
line: 'method.insert = d.get_finished_dir, simple, "cat={{path.stdout}}/downloads/rutorrent/,$d.custom1="'
state: present

- name: Set download data path location
Expand All @@ -68,32 +68,32 @@
line: 'method.insert = d.data_path, simple, "if=(d.is_multi_file), (cat,(d.directory),/), (cat,(d.directory),/,(d.name))"'
state: present

- name: Enable download completed move to /mnt/downloads/torrent
- name: Enable download completed move to {{path.stdout}}/downloads/torrent
lineinfile:
path: "/opt/appdata/{{pgrole}}/rtorrent/rtorrent.rc"
regexp: '#*method.insert\s*=\s*d.move_to_complete,\s*simple.*'
line: 'method.insert = d.move_to_complete, simple, "d.directory.set=$argument.1=; execute=mkdir,-p,$argument.1=; execute=mv,-u,$argument.0=,$argument.1=; d.save_full_session="'
state: present

- name: Enable download completed move event to /mnt/downloads/torrent
- name: Enable download completed move event to {{path.stdout}}/downloads/torrent
lineinfile:
path: "/opt/appdata/{{pgrole}}/rtorrent/rtorrent.rc"
regexp: '#*method.set_key\s*=\s*event.download.finished,move_complete.*'
line: 'method.set_key = event.download.finished,move_complete,"d.move_to_complete=$d.data_path=,$d.get_finished_dir="'
state: present

- name: Set download location || /mnt/downloads/incomplete
- name: Set download location || {{path.stdout}}/downloads/incomplete
lineinfile:
path: "/opt/appdata/{{pgrole}}/rtorrent/rtorrent.rc"
regexp: '#*directory\s*=.*'
line: 'directory = /mnt/incomplete/rutorrent'
line: 'directory = {{path.stdout}}/incomplete/rutorrent'
state: present

- name: Set download location default set
lineinfile:
path: "/opt/appdata/{{pgrole}}/rtorrent/rtorrent.rc"
regexp: '#*directory.default.set\s*=.*'
line: 'directory.default.set = /mnt/incomplete/rutorrent'
line: 'directory.default.set = {{path.stdout}}/incomplete/rutorrent'
state: present

# Disable DHT - i.e. disables trackerless torrents.
Expand Down Expand Up @@ -311,7 +311,7 @@
lineinfile:
path: "/opt/appdata/{{pgrole}}/rtorrent/rtorrent.rc"
regexp: '#*method.insert\s*=\s*d.get_finished_dir.*'
line: 'method.insert = d.get_finished_dir, simple, "cat=/mnt/downloads/rutorrent/,$d.custom1="'
line: 'method.insert = d.get_finished_dir, simple, "cat={{path.stdout}}/downloads/rutorrent/,$d.custom1="'
state: present

- name: Set download data path location
Expand Down