diff --git a/roles/container-engine/containerd/defaults/main.yml b/roles/container-engine/containerd/defaults/main.yml index 05cfd95c189..da51a4cd02e 100644 --- a/roles/container-engine/containerd/defaults/main.yml +++ b/roles/container-engine/containerd/defaults/main.yml @@ -18,6 +18,7 @@ containerd_runc_runtime: base_runtime_spec: cri-base.json options: systemdCgroup: "{{ containerd_use_systemd_cgroup | ternary('true', 'false') }}" + binaryName: "{{ bin_dir }}/runc" containerd_additional_runtimes: [] # Example for Kata Containers as additional runtime: diff --git a/roles/container-engine/containerd/templates/config.toml.j2 b/roles/container-engine/containerd/templates/config.toml.j2 index fc3ea477faa..cc43a3df601 100644 --- a/roles/container-engine/containerd/templates/config.toml.j2 +++ b/roles/container-engine/containerd/templates/config.toml.j2 @@ -35,7 +35,11 @@ oom_score = {{ containerd_oom_score }} [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.{{ runtime.name }}.options] {% for key, value in runtime.options.items() %} +{% if value | string != "true" and value | string != "false" %} + {{ key }} = "{{ value }}" +{% else %} {{ key }} = {{ value }} +{% endif %} {% endfor %} {% endfor %} {% if kata_containers_enabled %}