From 050a93df0792471d636e2dd4b7588ed20496fee6 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Fri, 1 Apr 2022 18:08:25 +0200 Subject: [PATCH] san conf --- .../templates/sanoid.conf.j2 | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 roles/mgrote.zfs_sanoid/templates/sanoid.conf.j2 diff --git a/roles/mgrote.zfs_sanoid/templates/sanoid.conf.j2 b/roles/mgrote.zfs_sanoid/templates/sanoid.conf.j2 new file mode 100644 index 00000000..cd4f0c29 --- /dev/null +++ b/roles/mgrote.zfs_sanoid/templates/sanoid.conf.j2 @@ -0,0 +1,29 @@ +{{ file_header | default () }} +## ZFS Section -------------------------------- ## +{% for item in sanoid_datasets if item.snapshots is sameas true %} +{% if item.snapshots is sameas true %} +[{{ item.path }}] + use_template = {{ item.template }} + recursive = {{ item.recursive }} +## -------------------------------------------- ## +{% endif %} +{% endfor %} + + + +## Template Section --------------------------- ## +{% for item in sanoid_templates %} +[template_{{ item.name }}] + ## Keep-Rules + hourly = {{ item.keep_hourly }} + daily = {{ item.keep_daily }} + monthly = {{ item.keep_monthly }} + yearly = {{ item.keep_yearly }} + frequently = {{ item.frequently }} + ## Interval + frequent_period = {{ item.frequent_period }} + ## Other Options + autosnap = {{ item.autosnap }} + autoprune = {{ item.autoprune }} +## -------------------------------------------- ## +{% endfor %}