1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

Merge pull request #7404 from jimi-c/issue_7363_docker_names

Make sure the docker data has a "Names" field before using it
This commit is contained in:
James Cammarata 2014-05-14 14:44:16 -05:00
commit 154ef942eb

View file

@ -507,6 +507,8 @@ class DockerManager:
running_image, running_tag = self.get_split_image_tag(i['Image'])
running_command = i['Command'].strip()
name_matches = False
if i["Names"]:
name_matches = (name and name in i['Names'])
image_matches = (running_image == image)
tag_matches = (not tag or running_tag == tag)