diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-05-23 05:40:09 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-05-25 00:04:27 +0200 |
commit | 7783703ff07eb90fea5a1251032dc2901602219d (patch) | |
tree | b92e4a7cf4cde4f3e773fd2e1dd41ebd4d968ac8 /roles/vm/host/tasks/zfs.yml | |
parent | add role zfs sanoid (diff) |
major revamp for zfs based vm images
Diffstat (limited to 'roles/vm/host/tasks/zfs.yml')
-rw-r--r-- | roles/vm/host/tasks/zfs.yml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/roles/vm/host/tasks/zfs.yml b/roles/vm/host/tasks/zfs.yml new file mode 100644 index 00000000..00de48a9 --- /dev/null +++ b/roles/vm/host/tasks/zfs.yml @@ -0,0 +1,12 @@ +--- +- name: create zfs base datasets + loop: "{{ lookup('dict', vm_host.zfs, wantlist=True) }}" + loop_control: + label: "{{ item.key }} -> {{ item.value.pool }}/{{ item.value.name }}{% if 'quota' in item.value %}={{ item.value.quota }}{% endif %}" + zfs: + name: "{{ item.value.pool }}/{{ item.value.name }}" + state: present + extra_zfs_properties: + quota: "{{ item.value.quota | default(omit) }}" + canmount: no + mountpoint: none |