danvaida.deluge

Ansible Deluge Role

This role installs and configures the Deluge BitTorrent client.

Important Note

Deluge saves its settings in files. If you change the settings using the Web UI or deluge-console instead of through this role, it can cause issues with how this role works.

Requirements

  • salted_sha1: An Ansible filter that creates salted SHA1-encrypted passwords.

    Example:

    {{ password | salted_sha1('your_salt_here') }}
    

Role Variables

Do not store passwords in plain text. Use ansible-vault for encryption.

  • deluge_users_to_add: A list of users to add to the Deluge auth file. Learn more

  • deluge_users_to_remove: A list of users to remove from the Deluge auth file.

  • deluge_config_dir: The directory that holds the Deluge configuration files.

  • deluge_web: A switch to set up Deluge's Web UI.

  • deluge_web_port: The port for Deluge's Web UI.

  • deluge_web_log_level: The log level for the Web UI. More options are available with deluge-web --help.

  • deluge_web_daemon_args: Arguments for the deluge-web service. Check available options using deluge-web --help.

  • deluge_web_password: The password for the Web UI.

  • deluge_web_password_salt: The salt used to generate the Web UI password.

The options above relate to the system settings; the next options configure how Deluge operates. Refer to defaults/main.yml for default values and the official docs for more details.

  • 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

To test the role in a Docker environment, use 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 HTTPS support.
  • Change from init.d scripts to systemd.
  • Run deluged and deluge-web in Docker containers.
  • Improve the salted_sha1.py filter plugin.

Contributing

Please follow this workflow:

  1. Fork the repository on GitHub.
  2. Clone it to your local machine.
  3. Make changes in your own branch.
  4. Push your changes back to your fork.
  5. Submit a Pull request for us to review.

NOTE: Make sure to merge the latest changes from the main repository before submitting a Pull request!

License

BSD

Informazioni sul progetto

Installs and configures Deluge BitTorrent client.

Installa
ansible-galaxy install danvaida.deluge
Licenza
Unknown
Download
82
Proprietario
sysadmin & solutions architect