Skip to content

Commit 734f843

Browse files
committed
ZFS support
1 parent 24e3ac5 commit 734f843

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

defaults/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
# List of pools to define and start.
33
# Each item should be a dict containing the following items:
44
# name: The name of the pool.
5-
# type: The type of the pool, currently only 'dir' is supported.
5+
# type: The type of the pool, currently only 'dir', 'lvm2' or 'zfs' are supported.
66
# capacity: The capacity, in bytes, of the pool.
77
# path: The absolute path to the pool's backing directory.
88
# mode: The access mode of the pool.

templates/pool.xml.j2

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33
{% if 'capacity' in item %}
44
<capacity>{{ item.capacity }}</capacity>
55
{% endif %}
6-
{% if item.type == 'lvm2' %}
6+
{% if item.type == 'lvm2' or item.type == 'zfs' %}
77
<source>
88
<name>{{ item.source }}</name>
9+
{% if item.type == 'lvm2' %}
910
<format type='lvm2'/>
11+
{% endif %}
1012
</source>
1113
{% endif %}
14+
{% if item.type != 'zfs' %}
1215
<target>
1316
<path>{{ item.path | default('placeholder_value') }}</path>
1417
</target>
18+
{% endif %}
1519
</pool>

0 commit comments

Comments
 (0)