diff --git a/roles/container-engine/containerd/templates/config.toml.j2 b/roles/container-engine/containerd/templates/config.toml.j2 index cc43a3df601..6172df33811 100644 --- a/roles/container-engine/containerd/templates/config.toml.j2 +++ b/roles/container-engine/containerd/templates/config.toml.j2 @@ -35,11 +35,9 @@ 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 %} +{% set is_bool = value|string|lower in ['true', 'false'] %} +{% set value = value|lower if is_bool else '"' ~ value ~ '"' %} {{ key }} = {{ value }} -{% endif %} {% endfor %} {% endfor %} {% if kata_containers_enabled %}