role_podman/templates/podman-quadlet.container.j2
2024-02-08 01:04:43 +01:00

36 lines
644 B
Django/Jinja

# {{ ansible_managed }}
[Unit]
Description=Wallbag container
[Container]
HostName={{ inventory_hostname }}
Image={{ container.image }}
ContainerName={{ container.name }}
{% if container.get('userns', '') | length > 0 %}
UserNS={{ container.userns }}
{% endif %}
AutoUpdate=registry
{% for volume in container.get('volumes', []) %}
Volume={{ volume }}
{% endfor %}
{% for port in container.get('ports', []) %}
PublishPort={{ port }}
{% endfor %}
{% for environment in container.get('environment_vars', []) %}
Environment={{ environment }}
{% endfor %}
[Service]
Restart=on-failure
TimeoutStartSec=900
[Install]
WantedBy=default.target