This commit is contained in:
2025-08-08 01:38:49 -04:00
parent d954c64e23
commit 3a508eb2dd
9 changed files with 331 additions and 2 deletions

View File

@@ -0,0 +1,10 @@
# {{ ansible_managed }}
{% if item.env is defined %}
{% for key, value in item.env.items() %}
{% if value is boolean %}
{{ key }}={{ value | lower }}
{% else %}
{{ key }}={{ value }}
{% endif %}
{% endfor %}
{% endif %}

View File

@@ -0,0 +1,17 @@
[Unit]
Description=%i podman-compose service for {{ podman_user }}
After=network-online.target
Wants=network-online.target
[Service]
Type=oneshot
RemainAfterExit=true
WorkingDirectory={{ podman_rootdir }}/%i
ExecStart=/usr/bin/podman-compose up -d --remove-orphans
ExecStop=/usr/bin/podman-compose down
Environment="PODMAN_USERNS=keep-id"
Environment="PODMAN_SOCKET_PATH=/run/user/{{ podman_userid }}/podman/podman.sock"
TimeoutStartSec=0
[Install]
WantedBy=default.target