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:
parent
f0270411fd
commit
612e5abff6
7 changed files with 18 additions and 16 deletions
|
@ -23,4 +23,4 @@ smb_workgroup: WORKGROUP
|
||||||
smb_min_protocol: "SMB2"
|
smb_min_protocol: "SMB2"
|
||||||
smb_client_min_protocol: "SMB2"
|
smb_client_min_protocol: "SMB2"
|
||||||
smb_client_max_protocol: "SMB3_11"
|
smb_client_max_protocol: "SMB3_11"
|
||||||
smb_enable_snapshots_dir: true
|
smb_enable_snapshots_dir: false
|
||||||
|
|
|
@ -6,6 +6,6 @@
|
||||||
---
|
---
|
||||||
- hosts: fileserver
|
- hosts: fileserver
|
||||||
roles:
|
roles:
|
||||||
- { role: mgrote_fileserver_smb, tags: "fileserver_smb" }
|
- { role: mgrote_fileserver_smb, tags: "smb" }
|
||||||
- { role: mgrote_youtubedl, tags: "youtubedl" }
|
- { role: mgrote_youtubedl, tags: "youtubedl" }
|
||||||
- { role: mgrote_disable_oom_killer, tags: "oom" }
|
- { role: mgrote_disable_oom_killer, tags: "oom" }
|
||||||
|
|
|
@ -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
|
## 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
|
## https://www.samba.org/samba/docs/current/man-html/vfs_catia.8.html
|
||||||
# aktiv?
|
# aktiv?
|
||||||
smb_enable_snapshots_dir: true
|
smb_enable_snapshots_dir: false
|
||||||
# welche Character/zeichen-Ersetzungen soll catia ausführen
|
# welche Character/zeichen-Ersetzungen soll catia ausführen
|
||||||
smb_catia_mappings: "0x3a:0xf7" # ersetzt ":" durch "÷"
|
smb_catia_mappings: "0x3a:0xf7" # ersetzt ":" durch "÷"
|
||||||
|
|
||||||
# als Windows-Shattenkopien einbinden
|
# als Windows-Shattenkopien einbinden
|
||||||
## https://www.samba.org/samba/docs/current/man-html/vfs_shadow_copy2.8.html
|
## 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
|
## 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?
|
# aktiv?
|
||||||
smb_enable_snapshots_shadow: false
|
smb_enable_snapshots_shadow: true
|
||||||
# wo liegen die Snapshots
|
# wo liegen die Snapshots
|
||||||
smb_shadow_snapdir: ".zfs/snapshot"
|
smb_shadow_snapdir: ".zfs/snapshot"
|
||||||
# Sortierung
|
# Sortierung
|
||||||
|
@ -104,4 +104,4 @@ smb_shadow_snapprefix: "^autosnap"
|
||||||
# Snapshot-"Trenner"
|
# Snapshot-"Trenner"
|
||||||
smb_shadow_delimiter: "_"
|
smb_shadow_delimiter: "_"
|
||||||
# zeitformat Snapshots
|
# zeitformat Snapshots
|
||||||
smb_shadow_localtime: "no"
|
smb_shadow_localtime: "yes"
|
||||||
|
|
|
@ -24,7 +24,7 @@ shadow: localtime = {{ smb_shadow_localtime }}
|
||||||
#======================= vfs objects =======================
|
#======================= vfs objects =======================
|
||||||
vfs objects = shadow_copy2, catia
|
vfs objects = shadow_copy2, catia
|
||||||
##======================= catia =======================
|
##======================= catia =======================
|
||||||
catia: mappings = {{ smb_catia_mappings }}
|
catia:mappings = {{ smb_catia_mappings }}
|
||||||
##======================= shadow_copy2 =======================
|
##======================= shadow_copy2 =======================
|
||||||
shadow: snapdir = {{ smb_shadow_snapdir }}
|
shadow: snapdir = {{ smb_shadow_snapdir }}
|
||||||
shadow: sort = {{ smb_shadow_sort }}
|
shadow: sort = {{ smb_shadow_sort }}
|
||||||
|
@ -32,6 +32,7 @@ shadow: format = {{ smb_shadow_format }}
|
||||||
shadow: snapprefix = {{ smb_shadow_snapprefix }}
|
shadow: snapprefix = {{ smb_shadow_snapprefix }}
|
||||||
shadow: delimiter = {{ smb_shadow_delimiter }}
|
shadow: delimiter = {{ smb_shadow_delimiter }}
|
||||||
shadow: localtime = {{ smb_shadow_localtime }}
|
shadow: localtime = {{ smb_shadow_localtime }}
|
||||||
|
shadow: snapdirseverywhere = yes
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -19,17 +19,14 @@
|
||||||
notify:
|
notify:
|
||||||
- systemctl daemon-reload
|
- systemctl daemon-reload
|
||||||
|
|
||||||
- name: add sanoid_mail.service to sanoid.service
|
- name: add overrides (sanoid_mail + TZ)
|
||||||
become: true
|
become: true
|
||||||
ansible.builtin.blockinfile:
|
ansible.builtin.template:
|
||||||
create: true
|
src: "overrides.j2"
|
||||||
mode: "0644"
|
mode: "0644"
|
||||||
owner: root
|
owner: root
|
||||||
group: root
|
group: root
|
||||||
path: /lib/systemd/system/sanoid.service.d/override.conf
|
dest: /lib/systemd/system/sanoid.service.d/override.conf
|
||||||
block: |
|
|
||||||
[Unit]
|
|
||||||
OnFailure = sanoid_mail.service
|
|
||||||
notify:
|
notify:
|
||||||
- systemctl daemon-reload
|
- systemctl daemon-reload
|
||||||
|
|
||||||
|
|
6
roles/mgrote_zfs_sanoid/templates/overrides.j2
Normal file
6
roles/mgrote_zfs_sanoid/templates/overrides.j2
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{{ file_header | default () }}
|
||||||
|
|
||||||
|
[Unit]
|
||||||
|
OnFailure = sanoid_mail.service
|
||||||
|
[Service]
|
||||||
|
Environment=TZ=Europe/Berlin
|
|
@ -7,8 +7,6 @@
|
||||||
## -------------------------------------------- ##
|
## -------------------------------------------- ##
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Template Section --------------------------- ##
|
## Template Section --------------------------- ##
|
||||||
{% for item in sanoid_templates %}
|
{% for item in sanoid_templates %}
|
||||||
[template_{{ item.name }}]
|
[template_{{ item.name }}]
|
||||||
|
|
Loading…
Reference in a new issue