Add podman container roles

This commit is contained in:
2019-12-28 20:07:15 -05:00
parent 0e5119bc6a
commit 8c8d1f9771
20 changed files with 581 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
[Unit]
Description={{ container_name }} Podman Container
After=network.target
[Service]
Type=forking
TimeoutStartSec={{ systemd_TimeoutStartSec }}
ExecStartPre=-/usr/bin/podman pod rm -f {{ container_name }}
User={{ container_run_as_user }}
RemainAfterExit=yes
ExecStart=/usr/bin/podman play kube {{ container_pod_yaml }}
ExecReload=-/usr/bin/podman pod stop {{ container_name }}
ExecReload=-/usr/bin/podman pod rm -f {{ container_name }}
ExecStop=-/usr/bin/podman pod rm -f {{ container_name }}
Restart={{ container_restart }}
RestartSec={{ systemd_RestartSec }}
[Install]
WantedBy=multi-user.target