diff --git a/group_vars/fileserver.yml b/group_vars/fileserver.yml index 5ccc4856..b9bbf595 100644 --- a/group_vars/fileserver.yml +++ b/group_vars/fileserver.yml @@ -23,4 +23,5 @@ smb_workgroup: WORKGROUP smb_min_protocol: "SMB2" smb_client_min_protocol: "SMB2" smb_client_max_protocol: "SMB3_11" -smb_enable_snapshots_dir: false +smb_enable_snapshots_dir: true +smb_enable_snapshots_shadow: true diff --git a/roles/mgrote_fileserver_smb/templates/smb.conf.j2 b/roles/mgrote_fileserver_smb/templates/smb.conf.j2 index 5b35c8c3..29c3b9c2 100644 --- a/roles/mgrote_fileserver_smb/templates/smb.conf.j2 +++ b/roles/mgrote_fileserver_smb/templates/smb.conf.j2 @@ -11,15 +11,16 @@ ##======================= catia ======================= vfs objects = catia catia: mappings = {{ smb_catia_mappings }} -{% elif smb_enable_snapshots_shadow is sameas true and smb_enable_snapshots_dir is sameas false %} +{% elif smb_enable_snapshots_dir is sameas false and smb_enable_snapshots_shadow is sameas true %} ##======================= shadow_copy2 ======================= -vfs objects = {{ smb_shadow_vfs_objects }} +vfs objects = shadow_copy2 shadow: snapdir = {{ smb_shadow_snapdir }} shadow: sort = {{ smb_shadow_sort }} shadow: format = {{ smb_shadow_format }} shadow: snapprefix = {{ smb_shadow_snapprefix }} shadow: delimiter = {{ smb_shadow_delimiter }} shadow: localtime = {{ smb_shadow_localtime }} +shadow: snapdirseverywhere = yes {% elif smb_enable_snapshots_shadow is sameas true and smb_enable_snapshots_dir is sameas true %} #======================= vfs objects ======================= vfs objects = shadow_copy2, catia