Install MergerFS and manage mountpoints.
Install the role: ansible-galaxy role install tigattack.mergerfs
Note
This role supports Debian-based and RHEL-based distributions.
[!WARNING] Breaking Change
mergerfs_install_mode
is no longer supported in version 2 of this role. Mergerfs will always be installed from GitHub, per the default behaviour in version 1. Furthermore,mergerfs_github_releases_url
is now calledmergerfs_github_repo_url
and should no longer have/releases
appended.
ansible.posix>=1.0.0
collection.
Default: latest
Version to install:
latest
- Specific version number, e.g.
2.28.2
MergerFS mountpoints to create. The path will be actively mounted and configured in fstab
by default.
Example:
mergerfs_mounts:
- path: /mnt/storage
branches:
- /mnt/data*
- /mnt/other
options: allow_other,use_ino
For further options, see the ansible.posix.mount documentation.
Supported ansible.posix.mount
options are:
src
(calledbranches
in this role)path
opts
(calledoptions
in this role)state
Please create an issue if support for further parameters is desired.
Default: false
Remove any mounted mergerfs filesystems that are not listed in the output of mergerfs_mounts
.
Default: true
Whether the role should install prerequisites for using mergerfs. If in doubt, leave default.
Prerequisites for each supported distribution family are listed in their respective files in vars/.
Default: false
Whether to install mergerfs-tools.
Note
As mergerfs-tools must be cloned from GitHub to install, this role will also ensure git
is installed on the host if this variable is true
.
Default: https://github.com/trapexit/mergerfs
URL of the mergerfs GitHub repository. Used to determine the latest version and download the package.
Default: https://github.com/trapexit/mergerfs-tools
URL of the mergerfs-tools GitHub repository. Used to clone the repository.
Default: /tmp/mergerfs-tools
Temporary directory to clone mergerfs-tools into before install.
- hosts: server
roles:
- role: tigattack.mergerfs
vars:
mergerfs_mounts:
- path: /mnt/data
branches:
- /mnt/data1
- /mnt/data2
options: allow_other,use_ino
MIT
This role was created in 2020 by Sylvain Prat.
After Sylvain archived the repository some time ago, I, tigattack, forked it in late 2022 to make some quality of life improvements and keep it maintained.