diff --git a/templates/config.toml.j2 b/templates/config.toml.j2 index c3bdd3b..32fdd24 100644 --- a/templates/config.toml.j2 +++ b/templates/config.toml.j2 @@ -124,17 +124,17 @@ sentry_dsn = "{{ gitlab_runner_sentry_dsn }}" {% if gitlab_runner.docker_security_opt is defined %} security_opt = {{ gitlab_runner.docker_security_opt | tojson }} {% endif %} -{% if gitlab_runner.extra_configs %} +{% if gitlab_runner.extra_configs is defined %} {% if 'runners.docker' in gitlab_runner.extra_configs %} {% for key, value in gitlab_runner.extra_configs['runners.docker'].items() %} {{ key }} = {{ value | tojson }} {% endfor %} {% endif %} -{#### [[runners.docker.sysctls]] section ####} +{#### [runners.docker.sysctls] section ####} {% if 'runners.docker.sysctls' in gitlab_runner.extra_configs %} [runners.docker.sysctls] {% for key, value in gitlab_runner.extra_configs['runners.docker.sysctls'].items() %} - {{ key }} = {{ value | tojson }} + "{{ key }}" = {{ value | tojson }} {% endfor %} {% endif %} {% endif %}