Files
toallab-automation/roles/ikke_t.podman_container_systemd/templates/systemd-service-single.j2

23 lines
619 B
Django/Jinja

[Unit]
Description={{ container_name }} Podman Container
After=network.target
[Service]
Type=simple
TimeoutStartSec={{ systemd_TimeoutStartSec }}
ExecStartPre=-/usr/bin/podman rm {{ container_name }}
User={{ container_run_as_user }}
ExecStart=/usr/bin/podman run --name {{ container_name }} \
{{ container_run_args }} \
{{ container_image }}
ExecReload=-/usr/bin/podman stop "{{ container_name }}"
ExecReload=-/usr/bin/podman rm "{{ container_name }}"
ExecStop=-/usr/bin/podman stop "{{ container_name }}"
Restart={{ container_restart }}
RestartSec={{ systemd_RestartSec }}
[Install]
WantedBy=multi-user.target