ansible-podman-collections
ansible-podman-collections copied to clipboard
fix(podman_image): skip empty volume items
Skip empty volume items with podman image build
:
- containers.podman.podman_image:
name: myimage
path: /tmp/myimage
build:
volume:
- "{{ '/tmp/whatever:/mnt/whatever' if false }}" # results in "" (empty string), which leads to podman error
state: build
This PR adds a check in podman_image
module, just like it is already done over here: https://github.com/containers/ansible-podman-collections/blob/master/plugins/module_utils/podman/podman_container_lib.py#L859-L863