Coder Social home page Coder Social logo

ansible-role-deluge's Introduction

Build Status Galaxy

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/Authentication

  • deluge_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 with deluge-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 and deluge-web services in Docker containers
  • Refactor the salted_sha1.py filter plugin

Contributing

Follow the "fork-and-pull" Git workflow.

  1. Fork the repo on GitHub
  2. Clone the project to your own machine
  3. Commit changes to your own branch
  4. Push your work back up to your fork
  5. 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-role-deluge's People

Contributors

danvaida avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.