deluge
Ansible Deluge role
Installs and configures Deluge BitTorrent client.
Caveat
Deluge is saving its configuration to files. You should be aware that
templating these config files and then changing the configuration in a
different way (through Web UI or deluge-console
), is breaking the
idempotence of this role.
Requirements
salted_sha1 A simple Ansible filter plugin that outputs salted SHA1-encrypted passwords.
{{ password | salted_sha1('salt_goes_here') }}
Role Variables
Do not keep the passwords in plain-text. Use ansible-vault
for encryption.
deluge_users_to_add: List of users to add to the
auth
file of Deluge. http://dev.deluge-torrent.org/wiki/UserGuide/Authenticationdeluge_users_to_remove: List of users to remove from the
auth
file of Deluge.deluge_config_dir: Path to the dir holding the configuration files and directories.
deluge_web: Binary switch for setting up and configuring Deluge's Web UI.
deluge_web_port: Port on which Deluge's Web UI is listening.
deluge_web_log_level: Log level for the UI. See available options with
deluge-web --help
.deluge_web_daemon_args: Arguments passed to the
deluge-web
binary that's running as a service. See available options withdeluge-web --help
.deluge_web_password: Password to be used for the Web UI.
deluge_web_password_salt: Password salt used when generating the Web UI password.
The options above are more system-related, whereas the following options
are specific to how Deluge is operating. Check defaults/main.yml
for
the default values and the official docs to learn more.
- deluge_allow_remote:
- deluge_autoadd_location:
- deluge_download_location:
- deluge_move_completed_path:
- deluge_prioritize_first_last_pieces:
- deluge_queue_new_to_top:
- deluge_torrentfiles_location:
Dependencies
None.
Example playbook
- hosts: raspberrypi
gather_facts: False
become: True
roles:
- role: deluge
deluge_web: False
deluge_users_to_add:
- name: userone
password: 12345
access_level: 10
- name: usertwo
password: 67890
access_level: 5
deluge_users_to_remove:
- usertwo
deluge_download_location: '/mnt/storage/disk'
Testing
If you want to run the tests on the provided Docker environment, run the following commands:
$ cd /path/to/ansible-role-deluge
$ docker build -t ansible-role-deluge tests/support
$ docker run -it -v $PWD:/role ansible-role-deluge
$ docker run -it -v $PWD:/role --env EXTRA_VARS='deluge_web=False' ansible-role-deluge
To do
- Add support for HTTPS
- Switch from init.d scripts to systemd
- Run the
deluged
anddeluge-web
services in Docker containers - Refactor the
salted_sha1.py
filter plugin
Contributing
Follow the "fork-and-pull" Git workflow.
- Fork the repo on GitHub
- Clone the project to your own machine
- Commit changes to your own branch
- Push your work back up to your fork
- Submit a Pull request so that we can review your changes
NOTE: Be sure to merge the latest from "upstream" before making a pull request!
License
BSD
ansible-galaxy install danvaida/ansible-role-deluge