Ansible role to install & configure the rclone Docker Volume Plugin.
Install the role: ansible-galaxy role install tigattack.rclone_docker_plugin
See the rclone Docker Volume Plugin documentation for further information. It's very useful for a deeper understanding of how this works.
This role requires the community.docker
collection.
You can install it like so: ansible-galaxy collection install community.docker
The most commonly useful variables are documented below. More variables and their default values can be seen in default/main.yml.
Important
Changing any of these variables after initial installation is likely to cause an error, as volume plugins cannot be updated while they are still enabled and in-use by existing volumes.
If you need to change any of the plugin options, volumes using the plugin must be removed and the plugin must be disabled.
Rclone volume plugin version. By default the latest available version will be installed.
Rclone arguments. Both rclone serve docker flags and generic rclone flags are supported, including backend parameters that will be used as defaults for volume creation.
Cache directory for rclone. There is no need to change this from the role's default value unless you have a specific reason to do so.
Config directory for rclone. The plugin will look for rclone.conf
in this directory. There is no need to change this from the role's default value unless you have a specific reason to do so.
Simple - Only install the plugin:
- hosts: all
roles:
- role: tigattack.rclone_docker_plugin
Advanced - Install specific a plugin version with custom args and a custom cache directory:
- hosts: all
roles:
- role: tigattack.rclone_docker_plugin
vars:
rclone_docker_plugin_version: '1.65.2'
rclone_docker_plugin_args: >-
--allow-other
--vfs-cache-mode=full
--vfs-cache-max-size=5G
rclone_docker_plugin_cache_dir: /home/user/.cache/rclone
rclone_docker_plugin_cache_dir_owner: user
rclone_docker_plugin_cache_dir_group: user
Thanks to cycneuramus for the foundations of this role's functionality (cycneuramus/ansible-hybrid-cloud).