All Projects → stefangweichinger → ansible-rclone

stefangweichinger / ansible-rclone

Licence: other
ansible role for rclone :: https://galaxy.ansible.com/stefangweichinger/ansible_rclone

Programming Languages

Jinja
831 projects

Projects that are alternatives of or similar to ansible-rclone

acid-store
A library for secure, deduplicated, transactional, and verifiable data storage
Stars: ✭ 48 (-49.47%)
Mutual labels:  rclone
netbackup
A frontend for various backup programs (rsync, rdiff-backup, rclone) that simplifies local and remote backups.
Stars: ✭ 15 (-84.21%)
Mutual labels:  rclone
Mega-index-heroku
Mega nz heroku index, Serves mega.nz to http via heroku web. It Alters downloading speed and stability
Stars: ✭ 165 (+73.68%)
Mutual labels:  rclone
ansible-github actions runner
Ansible Role to deploy GitHub Actions self-hosted runner
Stars: ✭ 76 (-20%)
Mutual labels:  ansible-role
ansible-ossec-server
Installing and maintaining the ossec-server for RedHat/Debian/Ubuntu.
Stars: ✭ 29 (-69.47%)
Mutual labels:  ansible-role
ansible-kafka
Ansible role for installing and configuring Apache Kafka on RedHat and Debian platforms.
Stars: ✭ 56 (-41.05%)
Mutual labels:  ansible-role
Ansible-Veeam
My Ansible Playbooks, Roles and Modules for Veeam
Stars: ✭ 21 (-77.89%)
Mutual labels:  ansible-role
ansible-role-tor
✳️🛡️ Securely build a system Tor and optionally configure numerous high-security Onion services.
Stars: ✭ 22 (-76.84%)
Mutual labels:  ansible-role
ansible-minecraft
Ansible role for provisioning a vanilla Minecraft server
Stars: ✭ 53 (-44.21%)
Mutual labels:  ansible-role
slam-mirrorbot
Aria/qBittorrent Telegram mirror/leech bot.
Stars: ✭ 1,072 (+1028.42%)
Mutual labels:  rclone
lykops
lykops是一套web可视化的运维自动化项目,基于python3+django开发的。可视化、简化执行ansible任务,并提供详细的任务执行报告。
Stars: ✭ 129 (+35.79%)
Mutual labels:  ansible-role
ansible-role-go
Ansible role - Go
Stars: ✭ 23 (-75.79%)
Mutual labels:  ansible-role
Torrents-to-Google-Drive
This is a Google Colab notebook with QBittorrent and Rclone, which can download torrents to Google Drive
Stars: ✭ 56 (-41.05%)
Mutual labels:  rclone
ansible-role-docker-ce
Ansible role to install Docker CE on AlmaLinux/Rocky/CentOS/Fedora/RHEL(Redhat)/Ubuntu/Debian/Mint/Raspbian
Stars: ✭ 73 (-23.16%)
Mutual labels:  ansible-role
ansible-role-intellij
Ansible role for installing the IntelliJ IDEA IDE
Stars: ✭ 39 (-58.95%)
Mutual labels:  ansible-role
nodejs
Ansible role for nodejs
Stars: ✭ 21 (-77.89%)
Mutual labels:  ansible-role
URL-Magnet-Cloud-Uploader-Heroku
Aria 2 Rclone Remote URL /magnet Clouds upload via HEROKU
Stars: ✭ 99 (+4.21%)
Mutual labels:  rclone
ansible-snort
No description or website provided.
Stars: ✭ 13 (-86.32%)
Mutual labels:  ansible-role
ansible-dnsmasq
Enter description of Ansible role
Stars: ✭ 17 (-82.11%)
Mutual labels:  ansible-role
rclone-rc-web-gui
Web GUI for rclone rc
Stars: ✭ 46 (-51.58%)
Mutual labels:  rclone

ansible-rclone

AKA ansible_rclone and formerly rclone

Ansible Molecule

GitHub Open Issues GitHub Stars GitHub Forks

Ansible Role Ansible Role Downloads

Description

An Ansible role to install rclone

Please note that this role installs rclone from the upstream repository and not from the OS repositories!

Usage

  1. Clone this repo into your local roles-directory or install via ansible-galaxy install stefangweichinger.ansible_rclone
  2. Add role to the hosts you want rclone installed to.

Supported Platforms

The build tests run on a selected set of distros:

  • Debian 9,10,11
  • Fedora 33,34,35
  • Ubuntu 1804,2004
  • Ubuntu derivated distros: Linux Mint, Pop!_OS

Some older releases also work with this role, but I decided to remove some of them from galaxy_info. PRs welcome, but we can't test on every platform.

In early 2022 I removed the tests for CentOS as it is not receiving upstream packages anymore. The role should still work, though.

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

install_manpages: "true"

This can be used to toggle the installation of manpages.

rclone_arch: "amd64"

This variable chooses the target architecture (for example 'amd64').

rclone_version: "1.57.0"

The version of rclone to install. rclone_version can be set to a specific version number. Make sure you add the last number as well: "1.56" won't work, "1.56.0" will do (check upstream repo for available releases).

rclone_version: "1.56.0"

rclone_release: "stable"

Can be set to "stable", or "beta" to install the latest beta version.

rclone_release: "beta"

rclone_config_location: "/root/.config/rclone/rclone.conf"

The location to install the rclone config file if you provide rclone_configs

rclone_configs: ""

This variable allows for predefined remote configs to be loaded. rclone_configs must be a YAML list with a name variable and a properties variable which is another list of arbitrary key value pairs. See the example below which would configure a Google Drive remote:

rclone_configs:
  - name: ExampleGoogleDriveRemote
    properties:
      type: drive
      client_id: 12345
      client_secret: 67890
      token: ' {"access_token":"","token_type":"","refresh_token":"","expiry":""}'

Note that the space after the single quote ' for token is intentional in order to force this into a string. Otherwise, it will be interpreted as an object and have its double quotes be converted to single quotes within the config file which rclone cannot parse correctly.

rclone_configs detailed example

The rclone_configs variable is used to recreate the rclone.conf file. This config file stores the rclone remotes that have been defined and are usable. This is an alternative to simply copying a stored rclone.conf file directly.

The rclone_configs simply takes a list of YAML objects which must have a name which will map to the name of the remote, and a properties which can be any key, value pairs which will map to the variables stored under that remote. These should be the ones expected by the rclone.conf file for the remote type you're configuring.

For example, to recreate a standard encrypted Google Drive mount setup, the rclone.conf will look similar to below, assuming you have your encypted files stored in the "media" folder on Google Drive:

[google-drive]
type = drive
client_id = <CLIENT_ID>
client_secret = <CLIENT_SECRET>
token = {"access_token":"<ACCESS_TOKEN>","token_type":"Bearer","refresh_token":"<REFRESH_TOKEN>","expiry":"<DATETIME>"}
root_folder_id = <ROOT_FOLDER_ID>

[encrypted-media]
type = crypt
remote = google-drive:media
filename_encryption = standard
password = <PASSWORD>
password2 = <PASSWORD2>

To enable ansible-rclone to recreate that config file, you can provide an rclone_configs variable as follows. Note that this should always be encrypted if stored publicly as it gives access to your remotes:

rclone_configs:
  - name: google-drive
    properties:
      type: drive
      client_id: <CLIENT_ID>
      client_secret: <CLIENT_SECRET>
      token: ' {"access_token":"<ACCESS_TOKEN>","token_type":"Bearer","refresh_token":"<REFRESH_TOKEN>","expiry":"<DATETIME>"}'
      root_folder_id = <ROOT_FOLDER_ID>
  - name: encrypted-media
    properties:
      type: crypt
      remote: google-drive:media
      filename_encryption: standard
      password: <PASSWORD>
      password2: <PASSWORD2>

Dependencies

None.

Example Playbook

- hosts: rclone-hosts
  roles:
    - rclone

Troubleshooting

Module Name Issue:

[WARNING]: - stefangweichinger.rclone was NOT installed successfully: - sorry, stefangweichinger.rclone was not found on https://galaxy.ansible.com/api/

Note that this module has undergone a name change. It was previously known as stefangweichinger.rclone, however Galaxy changed it's naming methods. We are working on a change that will put move it back to this name for simplicity. Ansible Galaxy substitutes - to _ and used to strip a prefix or ansible. For more information, see the this issue.

Molecule Testing

The tests of this ansible role use molecule I use the GitHub Action Test Ansible roles with Molecule for these tests.

(current) CI with GitHub Actions

In November 2020 I switched over to running the CI pipeline within Github Actions:

https://github.com/stefangweichinger/ansible-rclone/actions

Ansible Molecule

This, like this whole repo, is a work in progress.

tox

In January 2022 I learned about tox tox can be used for testing against various different Python versions, Ansible versions, etc. It is run within the molecule tests now.

(disabled) Travis CI

At first I used Travis CI, see the logs at https://travis-ci.org/github/stefangweichinger/ansible-rclone

Author Information

Stefan G. Weichinger

Please consider sponsoring me (upcoming).

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].