sanoid: set timezone (#716)

Reviewed-on: #716
Co-authored-by: Michael Grote <michael.grote@posteo.de>
Co-committed-by: Michael Grote <michael.grote@posteo.de>
This commit is contained in:
Michael Grote 2024-02-01 22:12:39 +01:00 committed by mg
parent f0270411fd
commit 612e5abff6
7 changed files with 18 additions and 16 deletions

View file

@ -23,4 +23,4 @@ smb_workgroup: WORKGROUP
smb_min_protocol: "SMB2"
smb_client_min_protocol: "SMB2"
smb_client_max_protocol: "SMB3_11"
smb_enable_snapshots_dir: true
smb_enable_snapshots_dir: false

View file

@ -6,6 +6,6 @@
---
- hosts: fileserver
roles:
- { role: mgrote_fileserver_smb, tags: "fileserver_smb" }
- { role: mgrote_fileserver_smb, tags: "smb" }
- { role: mgrote_youtubedl, tags: "youtubedl" }
- { role: mgrote_disable_oom_killer, tags: "oom" }

View file

@ -83,16 +83,16 @@ smb_packages:
## sorgt dafur das statt "A0KDC9~F" die Ordnernamen als "autosnap_2021-11-04_23÷59÷02_daily" angezeigt werden
## https://www.samba.org/samba/docs/current/man-html/vfs_catia.8.html
# aktiv?
smb_enable_snapshots_dir: true
smb_enable_snapshots_dir: false
# welche Character/zeichen-Ersetzungen soll catia ausführen
smb_catia_mappings: "0x3a:0xf7" # ersetzt ":" durch "÷"
# als Windows-Shattenkopien einbinden
## https://www.samba.org/samba/docs/current/man-html/vfs_shadow_copy2.8.html
## BUG: Windows sieht die Schattenkopien, kann die Ausgewählte Datei aber nicht öffnen wenn sie seit dem Snapshot gelöscht wurde, vmtl da Windows nicht den kompletten Snapshot-Pfad verwendet
## Format ist passend fur sanoid-Snapshots
## Format ist passend für sanoid-Snapshots
# aktiv?
smb_enable_snapshots_shadow: false
smb_enable_snapshots_shadow: true
# wo liegen die Snapshots
smb_shadow_snapdir: ".zfs/snapshot"
# Sortierung
@ -104,4 +104,4 @@ smb_shadow_snapprefix: "^autosnap"
# Snapshot-"Trenner"
smb_shadow_delimiter: "_"
# zeitformat Snapshots
smb_shadow_localtime: "no"
smb_shadow_localtime: "yes"

View file

@ -24,7 +24,7 @@ shadow: localtime = {{ smb_shadow_localtime }}
#======================= vfs objects =======================
vfs objects = shadow_copy2, catia
##======================= catia =======================
catia: mappings = {{ smb_catia_mappings }}
catia:mappings = {{ smb_catia_mappings }}
##======================= shadow_copy2 =======================
shadow: snapdir = {{ smb_shadow_snapdir }}
shadow: sort = {{ smb_shadow_sort }}
@ -32,6 +32,7 @@ shadow: format = {{ smb_shadow_format }}
shadow: snapprefix = {{ smb_shadow_snapprefix }}
shadow: delimiter = {{ smb_shadow_delimiter }}
shadow: localtime = {{ smb_shadow_localtime }}
shadow: snapdirseverywhere = yes
{% endif %}

View file

@ -19,17 +19,14 @@
notify:
- systemctl daemon-reload
- name: add sanoid_mail.service to sanoid.service
- name: add overrides (sanoid_mail + TZ)
become: true
ansible.builtin.blockinfile:
create: true
ansible.builtin.template:
src: "overrides.j2"
mode: "0644"
owner: root
group: root
path: /lib/systemd/system/sanoid.service.d/override.conf
block: |
[Unit]
OnFailure = sanoid_mail.service
dest: /lib/systemd/system/sanoid.service.d/override.conf
notify:
- systemctl daemon-reload

View file

@ -0,0 +1,6 @@
{{ file_header | default () }}
[Unit]
OnFailure = sanoid_mail.service
[Service]
Environment=TZ=Europe/Berlin

View file

@ -7,8 +7,6 @@
## -------------------------------------------- ##
{% endfor %}
## Template Section --------------------------- ##
{% for item in sanoid_templates %}
[template_{{ item.name }}]