From f33828e753158cfcdd85b7e3ca99ab1d4809f6d7 Mon Sep 17 00:00:00 2001 From: Chris Houseknecht Date: Tue, 20 Sep 2016 10:29:27 -0400 Subject: [PATCH] Cast scale value to int. Fixes #4592. --- lib/ansible/modules/cloud/docker/docker_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/docker/docker_service.py b/lib/ansible/modules/cloud/docker/docker_service.py index 8158de7e517..db4352c9306 100644 --- a/lib/ansible/modules/cloud/docker/docker_service.py +++ b/lib/ansible/modules/cloud/docker/docker_service.py @@ -877,7 +877,7 @@ class ContainerManager(DockerBaseClass): result['actions'][service.name]['scale'] = self.scale[service.name] - len(containers) if not self.check_mode: try: - service.scale(self.scale[service.name]) + service.scale(int(self.scale[service.name])) except Exception as exc: self.client.fail("Error scaling %s - %s" % (service.name, str(exc))) return result