diff --git a/roles/container-engine/cri-o/defaults/main.yml b/roles/container-engine/cri-o/defaults/main.yml index 5525790d1..5abe24db1 100644 --- a/roles/container-engine/cri-o/defaults/main.yml +++ b/roles/container-engine/cri-o/defaults/main.yml @@ -39,6 +39,8 @@ crio_stream_port: "10010" crio_required_version: "{{ kube_version | regex_replace('^v(?P\\d+).(?P\\d+).(?P\\d+)$', '\\g.\\g') }}" +crio_root: "/var/lib/containers/storage" + # The crio_runtimes variable defines a list of OCI compatible runtimes. crio_runtimes: - name: crun diff --git a/roles/container-engine/cri-o/templates/crio.conf.j2 b/roles/container-engine/cri-o/templates/crio.conf.j2 index d20e14dc8..c9ecdca6b 100644 --- a/roles/container-engine/cri-o/templates/crio.conf.j2 +++ b/roles/container-engine/cri-o/templates/crio.conf.j2 @@ -17,7 +17,7 @@ # Path to the "root directory". CRI-O stores all of its data, including # containers images, in this directory. -root = "/var/lib/containers/storage" +root = "{{ crio_root }}" # Path to the "run directory". CRI-O stores all of its state in this directory. # Read from /etc/containers/storage.conf first so unnecessary here