fix service unit indent on cloud-config-container module

This commit is contained in:
Roberto Jung Drebes 2022-08-23 20:21:44 +02:00
parent 1ca8bccfb3
commit 9597cabab7
1 changed files with 12 additions and 12 deletions

View File

@ -44,26 +44,26 @@ write_files:
After=gcr-online.target docker.socket
Wants=gcr-online.target docker.socket docker-events-collector.service
[Service]
%{ if authenticate_gcr && length(users) > 0 ~}
%{~ if authenticate_gcr && length(users) > 0 ~}
Environment="HOME=/home/${users[0].username}"
ExecStartPre=/usr/bin/docker-credential-gcr configure-docker
%{ endif ~}
ExecStart=/usr/bin/docker run --rm --name=${container_name} \
%{ if length(users) > 0 ~}
%{~ endif ~}
ExecStart=/usr/bin/docker run --rm --name=${container_name} \
%{~ if length(users) > 0 ~}
--user=${users[0].uid} \
%{ endif ~}
%{~ if docker_logging ~}
%{~ endif ~}
%{~ if docker_logging ~}
--log-driver=gcplogs \
%{~ endif ~}
%{~ if docker_args != null ~}
%{~ endif ~}
%{~ if docker_args != null ~}
${docker_args} \
%{~ endif ~}
%{ for volume in container_volumes ~}
%{~ endif ~}
%{~ for volume in container_volumes ~}
-v ${volume.host}:${volume.container} \
%{ endfor ~}
%{~ endfor ~}
${container_image} ${container_args}
ExecStop=/usr/bin/docker stop ${container_name}
%{ for path, data in files ~}
%{ for path, data in files ~}
- path: ${path}
owner: ${lookup(data, "owner", "root")}
permissions: ${lookup(data, "permissions", "0644")}