From 1801d4e00f6a057b82a80b9f708a3f6d3a78ed6f Mon Sep 17 00:00:00 2001 From: = Date: Thu, 19 Jan 2023 09:38:06 +0100 Subject: [PATCH] added logic for containers without volumes --- podman/files/container.sh.jinja | 2 ++ 1 file changed, 2 insertions(+) diff --git a/podman/files/container.sh.jinja b/podman/files/container.sh.jinja index a7f9337..090921b 100644 --- a/podman/files/container.sh.jinja +++ b/podman/files/container.sh.jinja @@ -7,6 +7,7 @@ function pull_image(){ } +{% if pillar['containers'][container]['volumes'] is defined %} function create_volumes() { {% for volume, mounts in args['volumes'].items() -%} if ! podman volume exists {{ container }}-{{ volume }}; then @@ -14,6 +15,7 @@ function create_volumes() { fi {% endfor %} } +{% endif %} function create_container() { if ! podman container exists {{ container }};then