|
|
|
@ -1303,10 +1303,12 @@ class DockerManager(object):
|
|
|
|
|
for name, value in self.module.params.get('labels').iteritems():
|
|
|
|
|
expected_labels[name] = str(value)
|
|
|
|
|
|
|
|
|
|
actual_labels = {}
|
|
|
|
|
for container_label in container['Config']['Labels'] or []:
|
|
|
|
|
name, value = container_label.split('=', 1)
|
|
|
|
|
actual_labels[name] = value
|
|
|
|
|
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
|
|
|
|
|
|
|
|
|
|
if actual_labels != expected_labels:
|
|
|
|
|
self.reload_reasons.append('labels {0} => {1}'.format(actual_labels, expected_labels))
|
|
|
|
|