mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-25 11:51:26 -07:00
Fix container labels expected vs actual comparison.
This commit is contained in:
parent
e37f57fc90
commit
964b7ecffa
1 changed files with 6 additions and 4 deletions
|
@ -1307,7 +1307,9 @@ class DockerManager(object):
|
|||
for name, value in self.module.params.get('labels').iteritems():
|
||||
expected_labels[name] = str(value)
|
||||
|
||||
actual_labels = {}
|
||||
if type(container['Config']['Labels']) is dict:
|
||||
actual_labels = container['Config']['Labels']
|
||||
else:
|
||||
for container_label in container['Config']['Labels'] or []:
|
||||
name, value = container_label.split('=', 1)
|
||||
actual_labels[name] = value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue