saltyorg / Saltbox

Ansible-based solution for rapidly deploying a Docker containerized cloud media server.
https://docs.saltbox.dev
GNU General Public License v3.0
571 stars 65 forks source link

Add mount and mergerfs toggle to remotes #170

Closed saltydk closed 6 months ago

saltydk commented 8 months ago

The current format of

rclone:
  enabled: true
  remotes:
    - remote: google
      template: google
      upload: true
      upload_from: /mnt/local/Media
      vfs_cache:
        enabled: false
        max_age: 504h
        size: 50G
  version: latest

Has a limitation in scenarios where the user adds upload remotes that aren't supposed to be mounted or if they want to mount something but avoid adding it to the mergerfs union.

rclone:
  enabled: true
  remotes:
    - remote: google
      template: google
      unionfs: true
      upload: true
      upload_from: /mnt/local/Media
      upload_only: false
      vfs_cache:
        enabled: false
        max_age: 504h
        size: 50G
  version: latest

Is one suggestion as to how it could look but if anyone has a better idea feel free to comment. Just be aware that we sort the keys alphabetically these days so that sort of limits my first thought of adding mount: true as one of the keys as it would look weird not to have the name of the remote at the top.

The example from above would be something like

rclone:
  enabled: true
  remotes:
    - mount: true
      remote: google
      template: google
      unionfs: true
      upload: true
      upload_from: /mnt/local/Media
      vfs_cache:
        enabled: false
        max_age: 504h
        size: 50G
  version: latest
saltydk commented 6 months ago

added in https://github.com/saltyorg/Saltbox/commit/d0b3be81597e2f000107c4966a56fd4e972f596c