From 8146b4520341ac2365602798732f2e8019f01ab0 Mon Sep 17 00:00:00 2001 From: Jan Weitz Date: Wed, 24 Dec 2014 04:03:22 +0100 Subject: [PATCH] Fixes invalid dictionary access. --- lib/ansible/modules/cloud/docker/docker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/docker/docker.py b/lib/ansible/modules/cloud/docker/docker.py index 00c805b8f85..03bf8a4af03 100644 --- a/lib/ansible/modules/cloud/docker/docker.py +++ b/lib/ansible/modules/cloud/docker/docker.py @@ -726,6 +726,8 @@ class DockerManager(object): 'name': self.module.params.get('name'), 'stdin_open': self.module.params.get('stdin_open'), 'tty': self.module.params.get('tty'), + 'dns': self.module.params.get('dns'), + 'volumes_from': self.module.params.get('volumes_from'), } if params['dns'] is not None: @@ -783,7 +785,7 @@ class DockerManager(object): 'network_mode': self.module.params.get('net'), } - optionals = [] + optionals = {} for optional_param in ('dns', 'volumes_from', 'restart_policy', 'restart_policy_retry'): optionals[optional_param] = self.module.params.get(optional_param)