Fix issue with refreservation in testing

This commit is contained in:
Wojciech Kozlowski 2023-03-19 19:17:18 +01:00
parent b12d15c3fe
commit eb545b5d69
3 changed files with 15 additions and 3 deletions

View File

@ -29,3 +29,7 @@ argument_specs:
system_backups_snapshots_data_dataset: system_backups_snapshots_data_dataset:
type: "str" type: "str"
required: true required: true
system_datasets_var_containers_zvol_properties:
type: "dict"
elem: "str"
required: true

View File

@ -15,9 +15,7 @@
community.general.zfs: community.general.zfs:
name: "{{ system_var_containers_dataset }}" name: "{{ system_var_containers_dataset }}"
state: "present" state: "present"
extra_zfs_properties: extra_zfs_properties: "{{ system_datasets_var_containers_zvol_properties }}"
volsize: "21474836480" # 20G
"com.sun:auto-snapshot": "false"
- name: "var : format containers zvol" - name: "var : format containers zvol"
community.general.filesystem: community.general.filesystem:

View File

@ -106,6 +106,16 @@
roles: roles:
- role: "system/datasets" - role: "system/datasets"
tags: "system:datasets" tags: "system:datasets"
vars:
_zvol_volsize: "21474836480" # 20G
system_datasets_var_containers_zvol_properties: "\
{% set _zvol_properties = {} %}\
{{ _zvol_properties.update({ 'volsize': _zvol_volsize }) }}\
{{ _zvol_properties.update({ 'com.sun:auto-snapshot': 'false' }) }}\
{% if not (the_nine_worlds_production | bool) %}\
{{ _zvol_properties.update({ 'refreservation': '0' }) }}\
{% endif %}\
{{ _zvol_properties }}"
- name: "system : asgard" - name: "system : asgard"
hosts: "asgard" hosts: "asgard"