diff --git a/plugins/module_utils/podman/podman_container_lib.py b/plugins/module_utils/podman/podman_container_lib.py index 1133517..75a557a 100644 --- a/plugins/module_utils/podman/podman_container_lib.py +++ b/plugins/module_utils/podman/podman_container_lib.py @@ -1441,7 +1441,7 @@ class PodmanContainerDiff: if "healthcheck" in self.info["config"]: # the "test" key is a list of 2 items where the first one is # "CMD-SHELL" and the second one is the actual healthcheck command. - if len(self.info["config"]["healthcheck"]["test"]) > 1: + if len(self.info["config"]["healthcheck"].get('test', '')) > 1: before = self.info["config"]["healthcheck"]["test"][1] after = self.params["healthcheck"] or before return self._diff_update_and_compare("healthcheck", before, after) diff --git a/tests/integration/targets/podman_container/tasks/main.yml b/tests/integration/targets/podman_container/tasks/main.yml index a584185..99cc5b2 100644 --- a/tests/integration/targets/podman_container/tasks/main.yml +++ b/tests/integration/targets/podman_container/tasks/main.yml @@ -133,7 +133,9 @@ - name: Check output is correct - TLS verify OFF assert: that: - - image_tls.podman_actions | select('search', '--tls-verify=False') | list | length > 0 + - >- + (image_tls.podman_actions | select('search', '--tls-verify=False') | list | length > 0) or + (image_tls.podman_actions | select('search', 'tls_verify": false') | list | length > 0) - name: Check using already pulled image - TLS verify OFF containers.podman.podman_container: @@ -951,8 +953,10 @@ podman_socket: "{{ podman_socket | default(omit) }}" - name: Rootfs container tests + when: podman_socket is not defined tags: - no_build_version + - rootfs block: - name: Create temporary rootfs directory