diff --git a/lib/ansible/modules/cloud/docker/docker.py b/lib/ansible/modules/cloud/docker/docker.py index ca2e186df1..0a82967085 100644 --- a/lib/ansible/modules/cloud/docker/docker.py +++ b/lib/ansible/modules/cloud/docker/docker.py @@ -750,6 +750,7 @@ class DockerManager(object): 'stdin_open': self.module.params.get('stdin_open'), 'tty': self.module.params.get('tty'), 'volumes_from': self.module.params.get('volumes_from'), + 'dns': self.module.params.get('dns'), } if docker.utils.compare_version('1.10', self.client.version()['ApiVersion']) >= 0: params['volumes_from'] = "" @@ -757,6 +758,11 @@ class DockerManager(object): if params['volumes_from'] is not None: self.ensure_capability('volumes_from') + extra_params = {} + if self.module.params.get('insecure_registry'): + if self.ensure_capability('insecure_registry', fail=False): + extra_params['insecure_registry'] = self.module.params.get('insecure_registry') + def do_create(count, params): results = [] for _ in range(count):