diff --git a/roles/container-engine/cri-o/templates/config.json.j2 b/roles/container-engine/cri-o/templates/config.json.j2 index 4afd49f6b..8d2fff842 100644 --- a/roles/container-engine/cri-o/templates/config.json.j2 +++ b/roles/container-engine/cri-o/templates/config.json.j2 @@ -1,16 +1,16 @@ {% if crio_registry_auth is defined and crio_registry_auth|length %} { -{% for reg in crio_registry_auth %} "auths": { +{% for reg in crio_registry_auth %} "{{ reg.registry }}": { "auth": "{{ (reg.username + ':' + reg.password) | string | b64encode }}" - } {% if not loop.last %} - }, + }, {% else %} - } + } {% endif %} {% endfor %} + } } {% else %} {}