--- - name: create zfs dataset zfs: name: "{{ kubelet_zfs.pool }}/{{ kubelet_zfs.name }}" state: present extra_zfs_properties: quota: "{{ kubelet_zfs.size }}" - name: bind mount filesytem mount: src: "{{ zfs_zpools[kubelet_zfs.pool].mountpoint }}/{{ kubelet_zfs.name }}" path: /var/lib/kubelet fstype: none opts: bind,x-systemd.automount,nofail state: mounted ## TODO: ## there is a race condition between the bind mound and the zfs-mount which is invisible to systemd. ## It seems ZFSonLinux 8 and beyond have a systemd-generator to fix this problem. Sadly Debain Buster and Ubuntu Bionic contain ## ZFSOnLinux 7 - so let's try the folllowing for a possible workaround: ## https://askubuntu.com/questions/988968/which-zfs-command-systemd-unit-to-depend-on-to-ensure-that-a-mountpoint-is-avail