summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/shell.py
Commit message (Collapse)AuthorAgeFilesLines
* Find places where ziploader is used and change them to ansiballz so that ↵Toshio Kuratomi2016-07-211-1/+1
| | | | people aren't confused when they google for information.information (#16715)
* Network Module: EOS (#16158)Nathaniel Case2016-06-201-0/+5
| | | | | | | | | | | | | | | * add new module network * move EOS to NetworkModule * shell.py Python 3.x compatibility * implements the Command class through the connection for eos This implements a new Command class that specifies the cli command and output format. This removes the need to batch commands through the connection * initial add of netcmd module
* fixes issues with authenticating using ssh-agent for ios devicesPeter Sprygada2016-06-061-0/+3
| | | | | | | Exception was raised when trying to use ssh-agent for authentication to ios devices. This fix enables ssh-agent and enable use of password protected ssh keys. There is one additional fix to capture authentication exceptions nicely.
* Merge pull request #15727 from privateip/shell_modulePeter Sprygada2016-05-181-6/+9
|\ | | | | handle name resolution errors more gracefully from shell.py
| * handle name resolution errors more gracefully from shell.pyPeter Sprygada2016-05-041-6/+9
| | | | | | | | | | This change will catch socket.gaierror exceptions from shell.py and return a more friendly message to the user
* | Port shell snippet to python3/2.4 compatible syntax (#15874)Michael Scherer2016-05-161-1/+3
|/
* Allow timeout to be configurable (#14973)Patrick Ogenstad2016-04-141-2/+1
|
* ZiploaderToshio Kuratomi2016-04-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ziploader proof of concept (jimi-c) * Cleanups to proof of concept ziploader branch: * python3 compatible base64 encoding * zipfile compression (still need to enable toggling this off for systems without zlib support in python) * Allow non-wildcard imports (still need to make this recusrsive so that we can have module_utils code that imports other module_utils code.) * Better tracebacks: module filename is kept and module_utils directory is kept so that tracebacks show the real filenames that the errors appear in. * Make sure we import modules that are used into the module_utils files that they are used in. * Set ansible version in a more pythonic way for ziploader than we were doing in module replacer * Make it possible to set the module compression as an inventory var This may be necessary on systems where python has been compiled without zlib compression. * Refactoring of module_common code: * module replacer only replaces values that make sense for that type of file (example: don't attempt to replace python imports if we're in a powershell module). * Implement configurable shebang support for ziploader wrapper * Implement client-side constants (for SELINUX_SPECIAL_FS and SYSLOG) via environment variable. * Remove strip_comments param as we're never going to use it (ruins line numbering) * Don't repeat ourselves about detecting REPLACER * Add an easy way to debug * Port test-module to the ziploader-aware modify_module() * strip comments and blank lines from the wrapper so we send less over the wire. * Comments cleanup * Remember to output write the module line itself in powershell modules * for line in lines strips the newlines so we have to add them back in
* adds additional details in exception handling in shell shared modulePeter Sprygada2016-04-041-1/+1
|
* feature to allow prompts to be configured at instatiationPeter Sprygada2016-03-131-7/+8
| | | | | | | | This commit adds a new feature to allow implementations of shell to specify the command prompt regexp to be used. It allows adds a new kwarg at instantiation to kick the remote device with a carriage return. By default the kickstart flag is true but can be disabled by passing kickstart=False.
* Merge pull request #14906 from devananda/fix-shell-for-junosPeter Sprygada2016-03-111-0/+1
|\ | | | | Send empty command before recv
| * Send empty command before recvDevananda van der Veen2016-03-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | On some switches, starting an SSH connection and immediately calling recv() will result in a connection timeout. The switch requires some input on the channel before it provides any prompt. As such, this patch sends an empty command immediately upon connection, triggering the switch to send a prompt which the shell can then interpret. Signed-off-by: Devananda van der Veen <devananda.vdv@gmail.com>
* | bugfix for shared module shell.pyPeter Sprygada2016-03-101-21/+0
|/ | | | | removes get_cli_connection function which was left over from a refactor but was no longer in use
* Use io.StringIO and io.BytesIO instead of StringIO.StringIO for compat with py3Toshio Kuratomi2016-02-261-1/+5
|
* Avoids authentication failed exception if user has private rsa keys under .sshogenstad2016-02-231-3/+3
|
* minor bug fixes and updates to shellPeter Sprygada2016-02-111-1/+7
|
* adds private key file support to shell shared modulePeter Sprygada2016-01-191-4/+7
| | | | | | This commit provides an argument to provide a path to the private key file. This will allow paramiko to use the key file as opposed to only username / password combinations for CLI connections.
* adds shared module shell for creating cli based transportsPeter Sprygada2016-01-081-0/+193
This commit add a new shared module shell that is used to build connections to network devices that operate in a CLI environment. This commit supercedes the issh.py and cli.py commits and removes them from module_utils.