blob: 1abf4d340a2e6959d2dd902cffea4d51a6cd6f72 (
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_zfs.pool }}/{{ containerd_zfs.name }}"
state: present
extra_zfs_properties: "{{ containerd_zfs.properties | default({}) | combine({'volsize': item.value.size}) }}"
- name: create and ext4 filesystem on the zfs volume
filesystem:
fstype: ext4
dev: "/dev/zvol/{{ containerd_zfs.pool }}/{{ containerd_zfs.name }}"
- name: mount filesytem
mount:
src: "/dev/zvol/{{ containerd_zfs.pool }}/{{ containerd_zfs.name }}"
path: /var/lib/containerd
fstype: ext4
opts: defaults,x-systemd.automount,nofail
state: mounted
|