From bbb9f4e09ba78eaf518d8e66caf5a437ebc6439b Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sun, 14 Jun 2020 16:26:00 +0200 Subject: docker/containerd/kubelet: more flexible handling of zfs properties --- roles/containerd/tasks/zfs.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'roles/containerd') diff --git a/roles/containerd/tasks/zfs.yml b/roles/containerd/tasks/zfs.yml index 60c6f3fd..2ebcae3c 100644 --- a/roles/containerd/tasks/zfs.yml +++ b/roles/containerd/tasks/zfs.yml @@ -1,12 +1,16 @@ --- ## containerd from ubuntu doesn't support zfs directly -## we need to create a volume create an ext4 fs on top of that... +## we need to create a volume and an ext4 fs on top of that... +- name: verify that the zfs volsize property is set + assert: + msg: "contained does not support zfs directly - please set the volsize property to make it a volume" + that: "'volsize' in containerd_zfs.properties" + - name: create zfs volume zfs: name: "{{ containerd_zfs.pool }}/{{ containerd_zfs.name }}" state: present - extra_zfs_properties: - volsize: "{{ containerd_zfs.size }}" + extra_zfs_properties: "{{ containerd_zfs.properties }}" - name: create and ext4 filesystem on the zfs volume filesystem: -- cgit v1.2.3