From f36666ae1d381ded85d8a993bb8a9177f9276715 Mon Sep 17 00:00:00 2001 From: Micheal Waltz Date: Tue, 21 Jul 2015 12:58:58 -0700 Subject: [PATCH] Use proper HostConfig element which contians the proper Memory value - fixes #1766 --- lib/ansible/modules/cloud/docker/docker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/docker/docker.py b/lib/ansible/modules/cloud/docker/docker.py index a732a8782b2..492d3e951ab 100644 --- a/lib/ansible/modules/cloud/docker/docker.py +++ b/lib/ansible/modules/cloud/docker/docker.py @@ -1036,7 +1036,7 @@ class DockerManager(object): except ValueError as e: self.module.fail_json(msg=str(e)) - actual_mem = container['Config']['Memory'] + actual_mem = container['HostConfig']['Memory'] if expected_mem and actual_mem != expected_mem: self.reload_reasons.append('memory ({0} => {1})'.format(actual_mem, expected_mem))