ansible-podman-collections icon indicating copy to clipboard operation
ansible-podman-collections copied to clipboard

fix(podman_image): skip empty volume items

Open bmenant opened this issue 5 months ago • 0 comments

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

bmenant avatar Aug 29 '24 16:08 bmenant