You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
1.6 KiB
28 lines
1.6 KiB
[Unit] |
|
Description={{ lookup('dict', container_data_unit).key }} container |
|
After=tripleo-container-shutdown.service |
|
Wants={{ lookup('dict', container_data_unit).value.depends_on | default([]) | join(',') }} |
|
[Service] |
|
Restart=always |
|
{% if lookup('dict', container_data_unit).value.depends_on is defined and (lookup('dict', container_data_unit).value.depends_on | length > 0) and podman_drop_in | default('false') %} |
|
ExecStart=/usr/libexec/tripleo-start-podman-container {{ lookup('dict', container_data_unit).key }} |
|
{% else %} |
|
ExecStart=/usr/bin/podman start {{ lookup('dict', container_data_unit).key }} |
|
{% endif %} |
|
ExecReload=/usr/bin/podman kill --signal HUP {{ lookup('dict', container_data_unit).key }} |
|
{% if lookup('dict', container_data_unit).value.pre_stop_exec is defined %} |
|
ExecStop=-/usr/bin/podman exec {{ lookup('dict', container_data_unit).key }} {{ lookup('dict', container_data_unit).value.pre_stop_exec }} |
|
{% endif %} |
|
ExecStop=/usr/bin/podman stop -t {{ lookup('dict', container_data_unit).value.stop_grace_period | default(10) | int }} {{ lookup('dict', container_data_unit).key }} |
|
ExecStopPost=/usr/bin/podman stop -t {{ lookup('dict', container_data_unit).value.stop_grace_period | default(10) | int }} {{ lookup('dict', container_data_unit).key }} |
|
SuccessExitStatus=137 143 |
|
KillMode=none |
|
Type=forking |
|
PIDFile=/var/run/{{ lookup('dict', container_data_unit).key }}.pid |
|
{% if lookup('dict', container_data_unit).value.systemd_exec_flags is defined %} |
|
{% for s_flag, s_value in lookup('dict', container_data_unit).value.systemd_exec_flags.items() %} |
|
{{ s_flag }}={{ s_value }} |
|
{% endfor %} |
|
{% endif %} |
|
[Install] |
|
WantedBy=multi-user.target
|
|
|