diff --git a/ansible/library/kolla_container_facts.py b/ansible/library/kolla_container_facts.py index 3f75a44789..ef3617db26 100644 --- a/ansible/library/kolla_container_facts.py +++ b/ansible/library/kolla_container_facts.py @@ -104,7 +104,7 @@ def use_podman(module, results): for container in containers: container.reload() container_name = container.attrs['Name'] - if container_name not in names: + if names and container_name not in names: continue results['_containers'].append(container.attrs) results[container_name] = container.attrs diff --git a/releasenotes/notes/bug-2058492-b86e8eceb04eec67.yaml b/releasenotes/notes/bug-2058492-b86e8eceb04eec67.yaml new file mode 100644 index 0000000000..f1c1e735c3 --- /dev/null +++ b/releasenotes/notes/bug-2058492-b86e8eceb04eec67.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Incorrect condition in Podman part prevented the retrieval + of facts of all the containers when no names were provided. + `LP#2058492 `__