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

modified: roles/pyenv/tasks/main.yml #28

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
26 changes: 13 additions & 13 deletions docs/advanced.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ rTorrent, for all hosts in your inventory:

.. code-block:: console

$ ansible box -f4 --become-user=rtorrent -a "~/bin/rtxmlrpc view.size '' default" -o
$ ansible box -f4 --become-user={{ rt_user }}/ -a "~/bin/rtxmlrpc view.size '' default" -o
my-box | success | rc=0 | (stdout) 42
my-box2 | success | rc=0 | (stdout) 123

Expand All @@ -55,8 +55,8 @@ this:

.. code-block:: shell

ansible box -f4 -a "sudo -i -u rtorrent -- ~rtorrent/.local/pyroscope/update-to-head.sh"
ansible box -f4 --become-user=rtorrent -a "~/bin/pyroadmin --version" -o
ansible box -f4 -a "sudo -i -u {{ rt_user }} -- ~rtorrent/.local/pyroscope/update-to-head.sh"
ansible box -f4 --become-user={{ rt_user }}/ -a "~/bin/pyroadmin --version" -o

This is especially useful if you control more than one host.

Expand Down Expand Up @@ -110,7 +110,7 @@ added to ``~rtorrent/.netrc``, like this:
.. code-block:: ini

machine localhost
login rtorrent
login {{ rt_user }}
password YOUR_PWD

Make sure to call ``chmod 0600 ~/.netrc`` after creating the file.
Expand Down Expand Up @@ -145,17 +145,17 @@ Implementation Details
Location of Configuration Files
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- ``/home/rtorrent/rtorrent/rtorrent.rc`` – Main *rTorrent*
- ``/home/{{ rt_user }}/rtorrent/rtorrent.rc`` – Main *rTorrent*
configuration file; to update it from this repository use
``-e force_cfg=yes``, see :doc:`setup` for details.
- ``/home/rtorrent/rtorrent/_rtlocal.rc`` – *rTorrent* configuration
- ``/home/{{ rt_user }}/rtorrent/_rtlocal.rc`` – *rTorrent* configuration
include for custom modifications, this is *never* overwritten once it
exists.
- ``/home/rtorrent/.pyroscope/config.ini`` – ``pyrocore`` main
- ``/home/{{ rt_user }}/.pyroscope/config.ini`` – ``pyrocore`` main
configuration.
- ``/home/rtorrent/.pyroscope/config.py`` – ``pyrocore`` custom field
- ``/home/{{ rt_user }}/.pyroscope/config.py`` – ``pyrocore`` custom field
configuration.
- ``/home/rtorrent/.config/flexget/config.yml`` – *FlexGet*
- ``/home/{{ rt_user }}/.config/flexget/config.yml`` – *FlexGet*
configuration.
- ``/home/rutorrent/ruTorrent-master/conf/config.php`` – *ruTorrent*
configuration.
Expand All @@ -170,13 +170,13 @@ Location of Configuration Files
Location of Installed Software
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- ``/home/rtorrent/.local/profile.d/`` — Directory with shell scripts
- ``/home/{{ rt_user }}/.local/profile.d/`` — Directory with shell scripts
that get sourced in ``~rtorrrent/.bash_aliases``.
- ``/home/rtorrent/.local/pyenv/`` — Unless you chose to use the
- ``/home/{{ rt_user }}/.local/pyenv/`` — Unless you chose to use the
system's *Python*, the interpreter used to run ``pyrocore`` and
``flexget`` is installed here.
- ``/home/rtorrent/.local/pyroscope`` — Virtualenv for ``pyrocore``.
- ``/home/rtorrent/.local/flexget`` — Virtualenv for ``flexget``.
- ``/home/{{ rt_user }}/.local/pyroscope`` — Virtualenv for ``pyrocore``.
- ``/home/{{ rt_user }}/.local/flexget`` — Virtualenv for ``flexget``.
- ``/home/rutorrent/ruTorrent-master`` — *ruTorrent* code base.


Expand Down
2 changes: 1 addition & 1 deletion roles/flexget/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
flexget_enabled: false
pyenv_python_version: 2.7.13
venv_bin: "/home/rtorrent/.local/pyenv/versions/{{ pyenv_python_version }}/bin/virtualenv"
venv_bin: "/home/{{ rt_user }}/.local/pyenv/versions/{{ pyenv_python_version }}/bin/virtualenv"
20 changes: 10 additions & 10 deletions roles/flexget/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
---
- name: Create FlexGet virtualenv
shell: su -c '{{ venv_bin }} .local/flexget' rtorrent
shell: su -c '{{ venv_bin }} .local/flexget' {{ rt_user }}
args:
executable: /bin/bash
chdir: /home/rtorrent
creates: /home/rtorrent/.local/flexget/bin/pip
chdir: /home/{{ rt_user }}
creates: /home/{{ rt_user }}/.local/flexget/bin/pip

- name: Install FlexGet
shell: su -c '.local/flexget/bin/pip install flexget' rtorrent
shell: su -c '.local/flexget/bin/pip install flexget' {{ rt_user }}
args:
executable: /bin/bash
chdir: /home/rtorrent
creates: /home/rtorrent/.local/flexget/bin/flexget
chdir: /home/{{ rt_user }}
creates: /home/{{ rt_user }}/.local/flexget/bin/flexget

- name: Create flexget ~/bin symlink
file: src=../.local/flexget/bin/flexget path=/home/rtorrent/bin/flexget state=link owner=rtorrent group=rtorrent
file: src=../.local/flexget/bin/flexget path=/home/{{ rt_user }}/bin/flexget state=link owner={{ rt_user }}/ group={{ rt_user }}/

- name: Create default FlexGet config (so --help works)
copy: content="" dest=/home/rtorrent/.local/flexget/config.yml owner=rtorrent group=rtorrent mode=0640 force=no
copy: content="" dest=/home/{{ rt_user }}/.local/flexget/config.yml owner={{ rt_user }}/ group={{ rt_user }}/ mode=0640 force=no

- name: Create FlexGet config dir
file: path=/home/rtorrent/.config/flexget state=directory owner=rtorrent group=rtorrent mode=0750
file: path=/home/{{ rt_user }}/.config/flexget state=directory owner={{ rt_user }}/ group={{ rt_user }}/ mode=0750

- name: Add FlexGet cron job
cron: user=rtorrent minute=*/11 name=flexget job="test ! -f ~/NOCRON && test -f ~/.config/flexget/config.yml && sleep 11 && nice ~/bin/flexget -c ~/.config/flexget/config.yml --cron execute >~/.config/flexget/flexget-cron.log 2>&1"
cron: user={{ rt_user }}/ minute=*/11 name=flexget job="test ! -f ~/NOCRON && test -f ~/.config/flexget/config.yml && sleep 11 && nice ~/bin/flexget -c ~/.config/flexget/config.yml --cron execute >~/.config/flexget/flexget-cron.log 2>&1"
30 changes: 15 additions & 15 deletions roles/pyenv/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
- name: Create .local directory
file: path=/home/rtorrent/.local state=directory owner=rtorrent group=rtorrent mode=0750
file: path=/home/{{ rt_user }}/.local state=directory owner={{ rt_user }} group={{ rt_user }} mode=0750

- name: Install build dependencies for pyenv
apt: name={{ item }} state=latest
Expand All @@ -20,18 +20,18 @@
- libncursesw5-dev

- name: Probe pyenv checkout
stat: path=/home/rtorrent/.local/pyenv/plugins/pyenv-installer/.gitignore
stat: path=/home/{{ rt_user }}/.local/pyenv/plugins/pyenv-installer/.gitignore
register: pyenv_flagfile

- name: git clone pyenv project
git: repo=https://github.com/yyuu/pyenv.git dest=/home/rtorrent/.local/pyenv
git: repo=https://github.com/yyuu/pyenv.git dest=/home/{{ rt_user }}/.local/pyenv
when: not pyenv_flagfile.stat.exists

- name: Create plugins directory
file: path=/home/rtorrent/.local/pyenv/plugins state=directory owner=rtorrent group=rtorrent mode=0750
file: path=/home/{{ rt_user }}/.local/pyenv/plugins state=directory owner={{ rt_user }} group={{ rt_user }} mode=0750

- name: git clone pyenv plugins
git: repo=https://github.com/yyuu/{{ item }}.git dest=/home/rtorrent/.local/pyenv/plugins/{{ item }}
git: repo=https://github.com/yyuu/{{ item }}.git dest=/home/{{ rt_user }}/.local/pyenv/plugins/{{ item }}
when: not pyenv_flagfile.stat.exists
with_items:
- pyenv-doctor
Expand All @@ -41,31 +41,31 @@
- pyenv-installer

- name: Fix pyenv ownership
file: path=/home/rtorrent/.local/pyenv state=directory recurse=true owner=rtorrent group=rtorrent
file: path=/home/{{ rt_user }}/.local/pyenv state=directory recurse=true owner={{ rt_user }} group={{ rt_user }}
when: not pyenv_flagfile.stat.exists

- name: Install pyenv activation
copy: src=pyenv.sh dest=/home/rtorrent/.local/profile.d/pyenv.sh owner=rtorrent group=rtorrent mode=0640
copy: src=pyenv.sh dest=/home/{{ rt_user }}/.local/profile.d/pyenv.sh owner={{ rt_user }} group={{ rt_user }} mode=0640

- name: Probe Python installation
stat: path=/home/rtorrent/.local/pyenv/version
stat: path=/home/{{ rt_user }}/.local/pyenv/version
register: pyenv_py_flagfile

- name: Install Python
shell: su -c '. .bash_aliases; TMPDIR=$PWD/tmp pyenv install {{ pyenv_python_version }}' rtorrent
shell: su -c '. .bash_aliases; TMPDIR=$PWD/tmp pyenv install {{ pyenv_python_version }}' {{ rt_user }}
args:
executable: /bin/bash
chdir: /home/rtorrent
creates: "/home/rtorrent/.local/pyenv/versions/{{ pyenv_python_version }}/bin/python"
chdir: /home/{{ rt_user }}
creates: "/home/{{ rt_user }}/.local/pyenv/versions/{{ pyenv_python_version }}/bin/python"
when: not pyenv_py_flagfile.stat.exists

- name: Install virtualenv and update pip
shell: su -c '.local/pyenv/versions/{{ pyenv_python_version }}/bin/pip install -U pip virtualenv' rtorrent
shell: su -c '.local/pyenv/versions/{{ pyenv_python_version }}/bin/pip install -U pip virtualenv' {{ rt_user }}
args:
executable: /bin/bash
chdir: /home/rtorrent
creates: "/home/rtorrent/.local/pyenv/versions/{{ pyenv_python_version }}/bin/virtualenv"
chdir: /home/{{ rt_user }}
creates: "/home/{{ rt_user }}/.local/pyenv/versions/{{ pyenv_python_version }}/bin/virtualenv"
when: not pyenv_py_flagfile.stat.exists

- name: Define global pyenv version
copy: content="{{ pyenv_python_version }}" dest=/home/rtorrent/.local/pyenv/version owner=rtorrent group=rtorrent mode=0640 force=no
copy: content="{{ pyenv_python_version }}" dest=/home/{{ rt_user }}/.local/pyenv/version owner={{ rt_user }} group={{ rt_user }} mode=0640 force=no
2 changes: 1 addition & 1 deletion roles/pyroscope-cli/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
pyenv_python_version: 2.7.13
python_bin: "/home/rtorrent/.local/pyenv/versions/{{ pyenv_python_version }}/bin/python"
python_bin: "/home/{{ rt_user }}/.local/pyenv/versions/{{ pyenv_python_version }}/bin/python"
8 changes: 4 additions & 4 deletions roles/pyroscope-cli/tasks/cron.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
---
- name: Install rtorrent cron scripts
copy: src=bin/{{ item }} dest=/home/rtorrent/bin/{{ item }} owner=rtorrent group=rtorrent mode=0750
copy: src=bin/{{ item }} dest=/home/{{ rt_user }}/bin/{{ item }} owner={{ rt_user }} group={{ rt_user }} mode=0750
with_items:
- _cron_autolabel
- _cron_rt_invalid_items
- _cron_sweep

- name: Copy ~/etc config files (once)
copy: src=etc/{{ item }} dest=/home/rtorrent/etc/{{ item }} owner=rtorrent group=rtorrent mode=0640 force=no
copy: src=etc/{{ item }} dest=/home/{{ rt_user }}/etc/{{ item }} owner={{ rt_user }} group={{ rt_user }} mode=0640 force=no
with_items:
- autolabel_rules
- sweep_rules

- name: Add rtorrent cron job 'rt_invalid_items'
cron: user=rtorrent minute=*/3 name=rt_invalid_items job="test ! -f ~/NOCRON && test -S ~/rtorrent/.scgi_local && sleep 21 && nice ~/bin/_cron_rt_invalid_items --stop --cron"
cron: user={{ rt_user }} minute=*/3 name=rt_invalid_items job="test ! -f ~/NOCRON && test -S ~/{{ rt_user }}/.scgi_local && sleep 21 && nice ~/bin/_cron_rt_invalid_items --stop --cron"

- name: Add rtorrent cron job '_cron_autolabel'
cron: user=rtorrent minute=*/31 name=_cron_autolabel job="test ! -f ~/NOCRON && ~/bin/_cron_autolabel --cron"
cron: user={{ rt_user }} minute=*/31 name=_cron_autolabel job="test ! -f ~/NOCRON && ~/bin/_cron_autolabel --cron"
22 changes: 11 additions & 11 deletions roles/pyroscope-cli/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
---
- name: Copy profile scripts
copy: src=profile.d/{{ item }} dest=/home/rtorrent/.local/profile.d/{{ item }} owner=rtorrent group=rtorrent mode=0640
copy: src=profile.d/{{ item }} dest=/home/{{ rt_user }}/.local/profile.d/{{ item }} owner={{ rt_user }} group={{ rt_user }} mode=0640
with_items:
- rt-alias.sh

- name: Copy helper scripts
copy: src=bin/{{ item }} dest=/home/rtorrent/bin/{{ item }} owner=rtorrent group=rtorrent mode=0750
copy: src=bin/{{ item }} dest=/home/{{ rt_user }}/bin/{{ item }} owner={{ rt_user }} group={{ rt_user }} mode=0750
with_items:
- rt-throttle

Expand Down Expand Up @@ -33,29 +33,29 @@
- libffi-dev

- name: Create PyroScope config dir
file: path=/home/rtorrent/.pyroscope state=directory owner=rtorrent group=rtorrent mode=0750
file: path=/home/{{ rt_user }}/.pyroscope state=directory owner={{ rt_user }} group={{ rt_user }} mode=0750

- name: Render default configuration files (no overwrite)
template: src="{{ item }}" dest="/home/rtorrent/.pyroscope/{{ item }}" owner=rtorrent group=rtorrent mode=0640 force=no
template: src="{{ item }}" dest="/home/{{ rt_user }}/.pyroscope/{{ item }}" owner={{ rt_user }} group={{ rt_user }} mode=0640 force=no
with_items:
- config.ini

- name: git clone 'pyrocore'
shell: su -c 'git clone https://github.com/pyroscope/pyrocore.git pyroscope' rtorrent
shell: su -c 'git clone https://github.com/pyroscope/pyrocore.git pyroscope' {{ rt_user }}
args:
executable: /bin/bash
chdir: /home/rtorrent/.local
creates: /home/rtorrent/.local/pyroscope/.gitignore
chdir: /home/{{ rt_user }}/.local
creates: /home/{{ rt_user }}/.local/pyroscope/.gitignore

- name: Initial 'pyroscope' installation
shell: su -c './update-to-head.sh {{ python_bin }}' rtorrent
shell: su -c './update-to-head.sh {{ python_bin }}' {{ rt_user }}
args:
executable: /bin/bash
chdir: /home/rtorrent/.local/pyroscope
creates: /home/rtorrent/.local/pyroscope/bin/pyroadmin
chdir: /home/{{ rt_user }}/.local/pyroscope
creates: /home/{{ rt_user }}/.local/pyroscope/bin/pyroadmin

- name: Get PyroScope & Python version
shell: "/home/rtorrent/bin/pyroadmin --version ; /home/rtorrent/.local/pyroscope/bin/python --version 2>&1"
shell: "/home/{{ rt_user }}/bin/pyroadmin --version ; /home/{{ rt_user }}/.local/pyroscope/bin/python --version 2>&1"
changed_when: False
register: pyro_versions
- debug: var=pyro_versions.stdout_lines
Expand Down
2 changes: 1 addition & 1 deletion roles/rtorrent-ps/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
force_cfg: no
main_rtrc_file: /home/rtorrent/rtorrent/rtorrent.rc
main_rtrc_file: /home/{{ rt_user }}/rtorrent/rtorrent.rc
rutorrent_rtrc_file: "{{ main_rtrc_file }}"
rtorrent_bindir: /opt/rtorrent/bin/

Expand Down
2 changes: 1 addition & 1 deletion roles/rtorrent-ps/files/crontab
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

CRON=true
MAILTO=root@localhost
HOME=/home/rtorrent
HOME=/home/{{ rt_user }}
LANG=en_US.UTF-8
PATH=$HOME/bin:/usr/bin:/usr/local/bin:/bin

Expand Down
8 changes: 4 additions & 4 deletions roles/rtorrent-ps/tasks/config.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
- name: Render default configuration and start script
template: src="rtorrent/{{ item.name }}" dest="/home/rtorrent/rtorrent/{{ item.name }}" owner=rtorrent group=rtorrent mode="{{ item.mode }}" force="{{ force_cfg }}"
template: src="rtorrent/{{ item.name }}" dest="/home/{{ rt_user }}/rtorrent/{{ item.name }}" owner={{ rt_user }} group={{ rt_user }} mode="{{ item.mode }}" force="{{ force_cfg }}"
with_items:
- { name: 'rtorrent.rc', mode: '0640' }
- { name: 'start', mode: '0750' }

- name: Render default "Local settings" include file
template: src=rtorrent/_rtlocal.rc dest=/home/rtorrent/rtorrent/_rtlocal.rc owner=rtorrent group=rtorrent mode=0640 force=no
template: src=rtorrent/_rtlocal.rc dest=/home/{{ rt_user }}/rtorrent/_rtlocal.rc owner={{ rt_user }} group={{ rt_user }} mode=0640 force=no

- name: Render "rtorrent.d" include files
template: src="rtorrent/rtorrent.d/{{ item }}" dest="/home/rtorrent/rtorrent/rtorrent.d/{{ item }}" owner=rtorrent group=rtorrent mode=0640
template: src="rtorrent/rtorrent.d/{{ item }}" dest="/home/{{ rt_user }}/rtorrent/rtorrent.d/{{ item }}" owner={{ rt_user }} group={{ rt_user }} mode=0640
with_items:
- 00-pyrocore.rc
- 05-rt-ps-columns.rc
Expand All @@ -33,4 +33,4 @@
- watch-dirs.rc

- name: Create rutorrent include placeholder
copy: content="" dest=/var/torrent/_rutorrent.rc owner=rtorrent group=rtorrent mode=0640 force=no
copy: content="" dest=/var/torrent/_rutorrent.rc owner={{ rt_user }} group={{ rt_user }} mode=0640 force=no
19 changes: 10 additions & 9 deletions roles/rtorrent-ps/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,15 +51,16 @@

- name: Create rtorrent group
group: name=rtorrent state=present
group: name={{ rt_user }} state=present

- name: Create rtorrent user
user: name=rtorrent comment="rTorrent Client" group=rtorrent groups=users append=yes shell=/bin/bash
user: name={{ rt_user }} comment="{{ rt_user }} rTorrent" group={{ rt_user }} groups=users append=yes shell=/bin/bash

- name: Create rtorrent home directory
file: path=/home/rtorrent state=directory owner=rtorrent group=rtorrent mode=0750
file: path=/home/{{ rt_user }} state=directory owner={{ rt_user }} group={{ rt_user }} mode=0750

- name: Create rtorrent home subdirs
file: path=/home/rtorrent/{{ item }} state=directory owner=rtorrent group=rtorrent mode=0750
file: path=/home/{{ rt_user }}/{{ item }} state=directory owner={{ rt_user }} group={{ rt_user }} mode=0750
with_items:
- bin
- etc
Expand All @@ -83,28 +84,28 @@
- .local/profile.d

- name: Copy rtorrent dot files
copy: src=dotfiles/{{ item.name }} dest=/home/rtorrent/.{{ item.name }} owner=rtorrent group=rtorrent mode=0640 force={{ item.force }}
copy: src=dotfiles/{{ item.name }} dest=/home/{{ rt_user }}/.{{ item.name }} owner={{ rt_user }} group={{ rt_user }} mode=0640 force={{ item.force }}
with_items:
- { name: bash_aliases, force: yes }
- { name: tmux.conf, force: no }

- name: Copy rtorrent scripts
copy: src=bin/{{ item }} dest=/home/rtorrent/bin/{{ item }} owner=rtorrent group=rtorrent mode=0750
copy: src=bin/{{ item }} dest=/home/{{ rt_user }}/bin/{{ item }} owner={{ rt_user }} group={{ rt_user }} mode=0750
with_items:
- _event.download.finished

- name: Render rtorrent bash helpers
template: src=bin/{{ item }} dest=/home/rtorrent/bin/{{ item }} owner=rtorrent group=rtorrent mode=0640
template: src=bin/{{ item }} dest=/home/{{ rt_user }}/bin/{{ item }} owner={{ rt_user }} group={{ rt_user }} mode=0640
with_items:
- _tools.sh

- name: Create rtorrent /var symlink
file: src=/home/rtorrent/rtorrent path=/var/torrent state=link
file: src=/home/{{ rt_user }}/rtorrent path=/var/torrent state=link

- include: config.yml

- name: Install initial rtorrent crontab
copy: src=crontab dest=/var/spool/cron/crontabs/rtorrent owner=rtorrent group=crontab mode=0600 force=no
copy: src=crontab dest=/var/spool/cron/crontabs/{{ rt_user }} owner={{ rt_user }} group=crontab mode=0600 force=no

- name: Add rtorrent cron job 'rt_backup_session'
cron: user=rtorrent minute=7 hour=0 name=rt_backup_session job="test ! -f ~/NOCRON && cd /var/torrent && tar cfz \"backups/session-$(date +'\%u').tgz\" .session/"
cron: user={{ rt_user }} minute=7 hour=0 name=rt_backup_session job="test ! -f ~/NOCRON && cd /var/torrent && tar cfz \"backups/session-$(date +'\%u').tgz\" .session/"
4 changes: 2 additions & 2 deletions roles/rutorrent/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
- include: install.yml

- name: Render rutorrent include for rtorrent
template: src=_rutorrent.rc dest=/var/torrent/_rutorrent.rc owner=rtorrent group=rtorrent mode=0640 force=yes
template: src=_rutorrent.rc dest=/var/torrent/_rutorrent.rc owner={{ rt_user }}/ group={{ rt_user }}/ mode=0640 force=yes

- name: Set ruTorrent config values
lineinfile:
Expand Down Expand Up @@ -73,7 +73,7 @@
register: avconv_bin

- name: Create ffmpeg to avconv symlink
file: src=/usr/bin/avconv path=/home/rtorrent/bin/ffmpeg state=link owner=rtorrent group=rtorrent
file: src=/usr/bin/avconv path=/home/{{ rt_user }}/bin/ffmpeg state=link owner={{ rt_user }}/ group={{ rt_user }}/
when: "( av_tool is not defined or av_tool != 'ffmpeg' ) and avconv_bin.stat.exists"

- include: fpm.yml
Expand Down
2 changes: 1 addition & 1 deletion roles/rutorrent/templates/_rutorrent.rc
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@
# This file is included by the main "rtorrent.rc" and initializes ruTorrent!

execute.throw = {sh, -c,\
export PATH=/home/rtorrent/bin:/home/rutorrent/bin:/usr/local/bin:/usr/bin:/bin ;\
export PATH=/home/{{ rt_user }}/bin:/home/rutorrent/bin:/usr/local/bin:/usr/bin:/bin ;\
/usr/bin/php /usr/share/nginx/htdocs/rutorrent/php/initplugins.php {{ rutorrent_www_user }} &}
2 changes: 1 addition & 1 deletion roles/rutorrent/templates/fpm-rutorrent.conf
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ pm.min_spare_servers = 1
pm.max_spare_servers = 3
php_admin_value[memory_limit] = {{ rutorrent_php_memory_limit }}
chdir = /home/rutorrent/profile
env[PATH] = /home/rutorrent/bin:/home/rtorrent/bin:/usr/local/bin:/usr/bin:/bin
env[PATH] = /home/rutorrent/bin:/home/{{ rt_user }}/bin:/usr/local/bin:/usr/bin:/bin
Loading