diff --git a/lib/ansible/modules/cloud/docker/docker.py b/lib/ansible/modules/cloud/docker/docker.py index 58cc5fdc82c..8491a56dcf5 100644 --- a/lib/ansible/modules/cloud/docker/docker.py +++ b/lib/ansible/modules/cloud/docker/docker.py @@ -1041,7 +1041,7 @@ class DockerManager(object): self.module.fail_json(msg=str(e)) #For v1.19 API and above use HostConfig, otherwise use Config - if docker_api_version >= 1.19: + if api_version >= 1.19: actual_mem = container['HostConfig']['Memory'] else: actual_mem = container['Config']['Memory']