blob: 7cf3363981bd3986404a1103c805c09564012e98 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
---
## containerd from ubuntu doesn't support zfs directly
## we need to create a volume and an ext4 fs on top of that...
- name: create zfs volume
zfs:
name: "{{ containerd_storage.pool }}/{{ containerd_storage.name }}"
state: present
extra_zfs_properties: "{{ containerd_storage.properties | default({}) | combine({'volsize': item.value.size}) }}"
- name: create and ext4 filesystem on the zfs volume
filesystem:
fstype: ext4
dev: "/dev/zvol/{{ containerd_storage.pool }}/{{ containerd_storage.name }}"
- name: mount filesytem
mount:
src: "/dev/zvol/{{ containerd_storage.pool }}/{{ containerd_storage.name }}"
path: /var/lib/containerd
fstype: ext4
opts: defaults,x-systemd.automount,nofail
state: mounted
|