diff options
author | Christian Pointner <equinox@spreadspace.org> | 2020-06-15 00:09:58 +0200 |
---|---|---|
committer | Christian Pointner <equinox@spreadspace.org> | 2020-06-15 00:09:58 +0200 |
commit | 35cf0966c3a3ab5bd519bf7a0ecc2fb9b4efea9f (patch) | |
tree | 2e1f29fdcee85170b1a5d098f1c713f93d4de768 /roles/vm/host/tasks/zfs.yml | |
parent | nextcloud/etherpad-lite imrpoved zfs property handling (diff) |
zfs backed vm volumes: improved property handling
Diffstat (limited to 'roles/vm/host/tasks/zfs.yml')
-rw-r--r-- | roles/vm/host/tasks/zfs.yml | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/roles/vm/host/tasks/zfs.yml b/roles/vm/host/tasks/zfs.yml index b88ee73e..b84f2d0d 100644 --- a/roles/vm/host/tasks/zfs.yml +++ b/roles/vm/host/tasks/zfs.yml @@ -2,14 +2,15 @@ - 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 %}" + label: "{{ item.key }} -> {{ item.value.pool }}/{{ item.value.name }} ({{ (item.value.properties | default({})).items() | map('join', '=') | join(', ') }})" + vars: + default_properties: + canmount: no + mountpoint: none zfs: name: "{{ item.value.pool }}/{{ item.value.name }}" state: present - extra_zfs_properties: - quota: "{{ item.value.quota | default(omit) }}" - canmount: no - mountpoint: none + extra_zfs_properties: "{{ default_properties | combine(item.value.properties | default({})) }}" - name: configure lvm to ignore zfs volumes lineinfile: |