Skip to content

Commit

Permalink
unionfs: remove feeder mount logic
Browse files Browse the repository at this point in the history
  • Loading branch information
saltydk committed Aug 28, 2023
1 parent e489218 commit 759840c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions inventories/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ torrents_downloads_path_is_defined: "{{ (downloads is defined) and
(downloads_torrents_path is not none) and
(downloads_torrents_path | trim | length > 0) }}"

feeder_mount_is_enabled: "{{ rclone.remotes | selectattr('remote', 'equalto', 'feeder') | list | count > 0 }}"

rclone_remote_is_defined: "{{ (rclone is defined) and
(rclone is not none) and
(rclone | trim | length > 0) and
Expand Down
4 changes: 2 additions & 2 deletions roles/unionfs/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Global
################################

local_mount_branch: "{{ '/mnt/remote/feeder=RW:' if feeder_mount_is_enabled else '/mnt/local=RW:' }}"
local_mount_branch: "/mnt/local=RW:"

custom_mount_branch: "" # Format: "/mnt/remote/someremote=NC"

Expand Down Expand Up @@ -55,7 +55,7 @@ mergerfs_mount_start_command: |-
/usr/bin/mergerfs \
-o category.create=ff,async_read=true,cache.files=partial \
-o dropcacheonclose=true,minfreespace=0,fsname=mergerfs \
-o xattr=nosys,statfs=full,statfs_ignore=nc,umask=002,noatime \
-o xattr=nosys,statfs=base,statfs_ignore=nc,umask=002,noatime \
{{ mergerfs_mount_branches }} /mnt/unionfs
mergerfs_mount_stop_command: /bin/fusermount3 -u /mnt/unionfs
2 changes: 1 addition & 1 deletion roles/unionfs/tasks/subtasks/variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

- name: Variables | Set '_remotes_list' variable
ansible.builtin.set_fact:
_remotes_list: "{{ _remotes_list | default('') + '/mnt/remote/' + item.remote + '=NC:' }}"
_remotes_list: "{{ _remotes_list | default('') + '/mnt/remote/' + (item.remote.split(':')[0] if ':' in item.remote else item.remote) + '=NC:' }}"
with_items: "{{ rclone.remotes }}"
when: rclone_remote_is_defined and use_remote and (item.remote != "feeder")

Expand Down

0 comments on commit 759840c

Please sign in to comment.