diff --git a/swh/templates/listers/configmap.yaml b/swh/templates/listers/configmap.yaml
index d85aab9e527a9edd5ab6a88dce8c3d2887eb8b59..b498df8ac4aa9c733c28451c401ceadcc80c270a 100644
--- a/swh/templates/listers/configmap.yaml
+++ b/swh/templates/listers/configmap.yaml
@@ -94,7 +94,8 @@ data:
     fi
 
     exit 0
-{{ if $use_json_logger -}}
+
+  {{ if $use_json_logger }}
   logging-configuration.yml: |
     version: 1