Add podman container roles
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,22 @@
|
||||
[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
|
||||
Reference in New Issue
Block a user