Drive sanoid changes from YAML
This commit is contained in:
parent
1bcb8f22b1
commit
35266e975d
2 changed files with 25 additions and 11 deletions
13
ansible/group_vars/all/sanoid.yml
Normal file
13
ansible/group_vars/all/sanoid.yml
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
sanoid_datasets:
|
||||||
|
tank:
|
||||||
|
use_template: production
|
||||||
|
recursive: true
|
||||||
|
sanoid_templates:
|
||||||
|
production:
|
||||||
|
frequently: 0
|
||||||
|
hourly: 36
|
||||||
|
daily: 30
|
||||||
|
monthly: 3
|
||||||
|
yearly: 0
|
||||||
|
autosnap: true
|
||||||
|
autoprune: true
|
|
@ -3,19 +3,20 @@
|
||||||
# It should go in /etc/sanoid. #
|
# It should go in /etc/sanoid. #
|
||||||
######################################
|
######################################
|
||||||
|
|
||||||
[tank]
|
{% for name, config in sanoid_datasets.items() %}
|
||||||
use_template = production
|
[{{ name }}]
|
||||||
recursive = yes
|
{% for key, value in config.items() %}
|
||||||
|
{{ key }} = {{ value | lower }}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
#############################
|
#############################
|
||||||
# templates below this line #
|
# templates below this line #
|
||||||
#############################
|
#############################
|
||||||
|
|
||||||
[template_production]
|
{% for name, config in sanoid_templates.items() %}
|
||||||
frequently = 0
|
[template_{{ name }}]
|
||||||
hourly = 36
|
{% for key, value in config.items() %}
|
||||||
daily = 30
|
{{ key }} = {{ value | lower }}
|
||||||
monthly = 3
|
{% endfor %}
|
||||||
yearly = 0
|
{% endfor %}
|
||||||
autosnap = yes
|
|
||||||
autoprune = yes
|
|
||||||
|
|
Loading…
Reference in a new issue