#jinja2: lstrip_blocks: True {{ ansible_managed | comment }} [Install] WantedBy=default.target [Service] Restart=on-failure RestartSec=5s EnvironmentFile=/etc/containers/systemd/redis.sys.env ExecReload=/usr/bin/podman kill --signal=SIGHUP %p [Container] Image={{ redis_image }} Exec=redis-server $REDIS_ARGS EnvironmentFile=/etc/containers/systemd/redis.env User=999 Group=999 {% for item in redis_volumes %} Volume={{ item.name }}:{{ item.dest }}{{ ":" + item.opts if item.opts is defined else "" }} {% endfor %} {% if (redis_cap_add + redis_cap_drop) | length > 0 %} {% if redis_cap_add | length > 0 %} AddCapability={{ redis_cap_add | join(" ") }} {% endif %} {% if redis_cap_drop | length > 0 %} DropCapability={{ redis_cap_drop | join(" ") }} {% endif %} {% endif %} Network={{ redis_network }} {% for item in redis_exposed_ports %} PublishPort={{ item }} {% endfor %} {% for item in redis_podman_args %} PodmanArgs={{ item }} {% endfor %}