From a59fe25bb196965f7ba279de667b54730a650a7e Mon Sep 17 00:00:00 2001 From: Peter Sprygada Date: Thu, 10 Mar 2016 21:15:15 -0500 Subject: [PATCH] bugfix for shared module shell.py removes get_cli_connection function which was left over from a refactor but was no longer in use --- lib/ansible/module_utils/shell.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/lib/ansible/module_utils/shell.py b/lib/ansible/module_utils/shell.py index bcb88fa790b..a3abe16032e 100644 --- a/lib/ansible/module_utils/shell.py +++ b/lib/ansible/module_utils/shell.py @@ -183,24 +183,3 @@ class Shell(object): self._matched_prompt = match.group() return True -def get_cli_connection(module): - host = module.params['host'] - port = module.params['port'] - if not port: - port = 22 - - username = module.params['username'] - password = module.params['password'] - - try: - cli = Cli() - cli.open(host, port=port, username=username, password=password) - except paramiko.ssh_exception.AuthenticationException, exc: - module.fail_json(msg=exc.message) - except socket.error, exc: - host = '%s:%s' % (host, port) - module.fail_json(msg=exc.strerror, errno=exc.errno, host=host) - except socket.timeout: - module.fail_json(msg='socket timed out') - - return cli