Skip to content

Commit

Permalink
unionfs: support more branches by splitting into multiple lines
Browse files Browse the repository at this point in the history
closes #237
  • Loading branch information
saltydk committed Jul 20, 2024
1 parent 8e0afa1 commit 2888c8d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion roles/unionfs/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ mergerfs_mount_start_command: |-
-o dropcacheonclose=true,minfreespace=0,fsname=mergerfs \
-o xattr={{ mergerfs_mount_xattr }},statfs=base,statfs_ignore=nc,umask={{ mergerfs_mount_umask }},noatime \
-o func.readdir={{ mergerfs_mount_readdir_policy }} \
{{ mergerfs_mount_branches }} /mnt/unionfs
{% set branches = mergerfs_mount_branches.split(':') %}
{%- for branch in branches %}
{% if loop.index0 is divisibleby 10 and not loop.first %}
\
{% endif %}
{% if loop.first %}
{% filter indent(2, first=True) -%}
{%- if loop.first -%}"{%- endif -%}{{ branch }}{%- if not loop.last -%}:{%- endif %}
{%- endfilter %}
{% else %}
{{ branch}}{%- if not loop.last -%}:{%- endif %}
{% endif %}
{%- endfor %}" /mnt/unionfs
mergerfs_mount_stop_command: /bin/fusermount3 -uz /mnt/unionfs

0 comments on commit 2888c8d

Please sign in to comment.