summaryrefslogtreecommitdiff
path: root/lib/ansible/plugins/connection
Commit message (Collapse)AuthorAgeFilesLines
* Revert "winrm: add further conditional to using pexect for kerb auth (#45952)"Matt Clay2018-09-251-18/+5
| | | | | | This reverts commit 918d45f95788ac0f821c3ca06f23d0dab1a9ab6b. Unintentionally merged before 2.7.0 final.
* winrm: add further conditional to using pexect for kerb auth (#45952)Jordan Borean2018-09-251-5/+18
| | | | (cherry picked from commit d6251e5b2780932c5954db73beb9bcbd45ad16f0)
* These won't get upgraded to bool if ansible doesn't know they areNathaniel Case2018-09-191-0/+2
| | | | | Adapted from #45736, the other change came from a commit that will not be backported
* Fix sshkeyfilename is None not str (#44893)linnil12018-09-061-2/+2
| | | | (cherry picked from commit 177fbea35167eb4914c89ae77f0ead568823ac09)
* Fix cli_command multiple prompt issue (#44922)Ganesh Nalawade2018-08-311-11/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add check in network_cli to handle all prompts * Add check_all flag to mandatory handle all the command prompt in prompts list. By default if any one prompt is handled remaining prompts are ignored. * Fix cli_command multiple prompt issue * If multiple prompt and answers are given as input network_cli handles only the first prompt that matched by default * If a command execution results in muliple prompt the fix add support to set a boolean option C(check_all) to indicate network_cli to wait till all the prompts and answers are processed. * Update cli_command * Update api doc * Fix unit test failure * Fix CI failure * Update network_cli * Fix review comment
* Setting options is fine if plugins already exist (#44859)Nathaniel Case2018-08-291-3/+13
|
* Move plugin option settings. (#44774)Nathaniel Case2018-08-284-11/+17
| | | | | | * Move plugin option settings. * Add default value and clear after use.
* Add support for multiple prompt answers in network_cli (#44492)Ganesh Nalawade2018-08-231-2/+5
| | | | | | | | * Currently network_cli support multiple prompts single answer as response. This PR adds support for multiple answers. * In case of multiple prompts and mulitple answers the index of a particular prompt in the prompts list should match with the index in the answer list.
* psrp: Added new Windows connection plugin (#41729)Jordan Borean2018-08-211-0/+600
| | | | | | * psrp: Added new Windows connection plugin * Tweaks to connection options from review
* Update netconf_config module (#44379)Ganesh Nalawade2018-08-211-5/+7
| | | | | | | | | | | | | | | | Fixes #40650 Fixes #40245 Fixes #41541 * Refactor netconf_config module as per proposal #104 * Update netconf_config module metadata to core network supported * Refactor local connection to use persistent connection framework for backward compatibility * Update netconf connection plugin configuration varaibles (Fixes #40245) * Add support for optional lock feature to Fixes #41541 * Add integration test for netconf_config module * Documentation update * Move deprecated options in netconf_config module
* httpapi: let httpapi plugin handle HTTPErrors other than 401 (#43436)Nathaniel Case2018-08-131-11/+18
| | | | | | | | | | | | | | * Hold httpapi response in BytesIO * Let httpapi plugin deal with HTTP codes if it wants * Python 3.5 won't json.loads() bytes * Don't modify headers passed to send * Move code handling back to send() but let httpapi plugin have a say on how it happens
* Prevent data being truncated over persistent connection socket (#43885)Nathaniel Case2018-08-101-20/+18
| | | | | | | | | | | | | | | | | | * Change how data is sent to the persistent connection socket. We can't rely on readline(), so send the size of the data first. We can then read that many bytes from the stream on the recieving end. * Set pty to noncanonical mode before sending * Now that we send data length, we don't need a sentinel anymore * Copy socket changes to persistent, too * Use os.write instead of fdopen()ing and using that. * Follow pickle with sha1sum of pickle * Swap order of vars and init being passed to ansible-connection
* Fix typoDag Wieers2018-08-101-1/+1
|
* Fix ini variables for netconf and network_cli connections (#43599)Sebastian Wiesinger2018-08-022-12/+12
|
* Enable setting options for cliconf and other implementation plugins (if set ↵Ganesh Nalawade2018-07-302-1/+11
| | | | | | | | | | | | | to configurable) (#43368) * Enable setting setting cliconf plugin options Fixes #43367 * Add support to set configuration options for implementation plugins (eg: cliconf) from `ansible-connection` * Fix CI failure
* httpapi: Split off and save response text contents (#43305)Nathaniel Case2018-07-261-4/+6
| | | | | | * Split off and save response text contents * login might depend on httpapi
* Try to enable more exotic auth methods in httpapi (#43212)Nathaniel Case2018-07-241-5/+18
| | | | | | | | * Try to enable more exotic auth methods in httpapi * Auth tokens won't always come back. * Reconcile #43147 with this PR
* ssh - skip connection reset if controlpath does not exist (#43062)Jordan Borean2018-07-241-1/+13
|
* pr 42271 - fixed merge conflictsSandra McCann2018-07-201-3/+18
|\
| * Minor changesGanesh B. Nalawade2018-07-041-2/+1
| |
| * Update ssh_config to accept file pathGanesh B. Nalawade2018-07-041-7/+8
| |
| * Add options for jumphost in netconf connetionGanesh B. Nalawade2018-07-031-1/+16
| | | | | | | | | | | | | | | | | | | | | | Fixes #37262 Fixes #36284 * Updates options in netconf connection to enable bastion/jump host setting using configuration/enviornment varaibles. * Update troubleshooting docs from using bastion host with netconf connection
* | Support setting persistent command timeout per task basis (#42847)Ganesh Nalawade2018-07-203-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Support setting persistent command timeout per task basis Fixes #42200 * Add variable `ansible_command_timeout` to `persistent_command_timeout` option for `network_cli` and `netconf` connection plugin so that the command_timeout can be set per task basis while using `connection=network_cli` or `connection=netconf` eg: ``` - name: run copy command ios_command: commands: - show version vars: ansible_command_timeout: 40 ``` * Modify `ansible-connection` to read command_timeout value from connection plugin options. * Add `ansible_command_timeout` to `persistent_command_timeout` option in `persistent` to support `connection=local` so that it is backward compatibilty * To support `connection=local` pass the timeout value as variables from persistent connection to `ansible-connection` instead of sending it in playcontext * Fix CI failure * Fix review comment
* | fix py3 string error in ssh failure handling (#42655)Matt Davis2018-07-131-5/+5
| |
* | changed winrm _reset to reset and make ssh reset show warning (#42651)Jordan Borean2018-07-112-2/+2
| | | | | | | | | | | | * changed winrm _reset to reset and make ssh reset show warning * minor changelog update
* | win_reboot: fix 2.6 issues and better handle post reboot reboot (#42330)Jordan Borean2018-07-111-6/+6
| | | | | | | | | | | | | | | | | | | | * win_reboot: fix 2.6 issues and better handle post reboot reboot * changed winrm _reset to reset * Add handler to reset calls when .reset() throws an AnsibleError on older hosts * Moving back to _reset to get the issue fixed
* | Separate some 255 exit codes that are not ssh errorsToshio Kuratomi2018-07-091-5/+19
| | | | | | | | | | | | The ssh connection plugin is overzealous in thinking that error code 255 can only come from ssh. Python can return 255 in some circumstances and error from php does as well.
* | Update eos, ios, vyos cliconf plugin (#42300)Ganesh Nalawade2018-07-041-4/+5
|/ | | | | | | | | | | * Update eos cliconf plugin methods * Refactor eos cliconf plugin * Changes in eos module_utils as per cliconf plugin refactor * Fix unit test and sanity failures * Fix review comment
* Base connection class for network-style connections (#41839)Nathaniel Case2018-07-024-261/+204
| | | | | | | | | | | | | | * Create base class for network-style connections * clean up some differences * Move NetworkConnectionBase * Tweak netconf for tests * Tweak when network_os is checked to avoid failing tests * Pull back exec_command
* Stop displaying kinit pass input on a failure (#41882)Jordan Borean2018-06-261-2/+7
| | | | | | * Stop displaying kinit pass input on a failure * Fixed up minor logic info and added tests
* New base class for HttpApi plugins (#41915)Nathaniel Case2018-06-251-28/+37
|
* Make validate_certs togglable for httpapi (#41538)Nathaniel Case2018-06-221-1/+8
| | | | | | * Make validate_certs togglable for httpapi * Add `version_added`
* Correct defaults in lxc and lxd connection pluginAbhijeet Kasurde2018-06-192-2/+2
| | | | | | | remote_addr value defaults to inventory_hostname, current defaults seems to be copy-paste error. Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
* Add cli and netconf ability from ansible itself for cloudengine ce modules ↵Biao Liu2018-06-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | (#41357) * for shippable for shippable * add cliconf * add network_cli * add cliconf and network cli and netconf * modify bugs of netconf * add shippable modify * update shippable update shippable
* Fix a process execution using lxc connection plugin on Python3.toshi_pp2018-06-111-3/+4
| | | | | | python2-lxc module needs bytes, on the other hand python3-lxc requires text. To solve such incompatibility, use to_native other than to_bytes. This fixes #41060.
* Update winrm.py (#41303)jainnikhil302018-06-081-1/+1
| | | fix the typos for winrm port
* ensure all config sources for ssh optionsBrian Coca2018-06-061-1/+58
|
* Refactor ios cliconf plugin and ios_config module (#39695)Ganesh Nalawade2018-06-061-0/+4
| | | | | | | | | | | | | | | | | | | | | * Refactor ios cliconf plugin and ios_config module * Refactor ios cliconf plugin to support generic network_config module * Refactor ios_config module to work with cliconf api's * Enable command and response logging in cliconf pulgin * cliconf api documentation * Fix unit test and other minor changes * Doc update * Fix CI failure * Add default flag related changes * Minor changes * redact input command logging by default
* Don't try to reuse ansible_port, it doesn't work that way (yet?) (#41022)Nathaniel Case2018-06-011-1/+0
|
* Create a new pipe for sshpass on final retry. Fixes #32238 (#39294)james-jra2018-05-251-0/+5
|
* Fixes to httpapi for EAPI (#40675)Nathaniel Case2018-05-241-7/+4
| | | | | | | | * Replace errant uses of str * Hook up become to eapi * Hook become up to nxapi, too
* Add NETCONF support for SROS devices (#40330)wiso2018-05-241-1/+2
| | | | | | | | | | * added NETCONF support for SROS devices * corrected alu mapping * fix pep8 in sros.py * BOT META file updated
* Docs - add shared snippet note about password prompts for ssh keys (#40633)Adam Miller2018-05-231-4/+7
| | | | | | | | | | * Docs - add shared snippet note about password prompts for ssh keys Signed-off-by: Adam Miller <admiller@redhat.com> * add note to ssh connection plugin, fix markup, fix typo Signed-off-by: Adam Miller <admiller@redhat.com>
* winrm: add better exception handling for krb5 auth with pexpect (#39930)Jordan Borean2018-05-231-12/+39
| | | | | | | | | | * winrm: add better exception handling for krb5 auth with pexpect * Added changelog fragment * Added exception handler in case kinit path isn't valid, added test cases * fixed for Python 2 compatibility
* Fix persistent timeout definitions (#40540)Nathaniel Case2018-05-222-6/+6
|
* winrm: source user from options than remote_user (#40467)Jordan Borean2018-05-221-4/+3
| | | | | | | | | | * winrm: source user from options than remote_user * fixed up mock for kerberos import * Added changelog fragment * get hostname from option as well
* Fixing issues with httpapi (#40388)Nathaniel Case2018-05-212-8/+23
| | | | | | | | | | | | | | * I seem to have forgotten the back half of tests * Set http timeout from persistent_command_timeout * Tweak URL generation and provide URL on error * Push var_options to connection process * Don't wait forever if coming from persistent * Don't send the entire contents of variables to ansible-connection
* HTTP(S) API connection plugin (#39224)Nathaniel Case2018-05-171-0/+303
| | | | | | | | | | | | | | | | | | | | | | | | * HTTPAPI connection * Punt run_commands to cliconf or httpapi * Fake enable_mode on eapi * Pull changes to nxos * Move load_config to edit_config for future-preparedness * Don't fail on lldp disabled * Re-enable check_rc on nxos' run_commands * Reorganize nxos httpapi plugin for compatibility * draft docs for connection: httpapi * restores docs for connection:local for eapi * Add _remote_is_local to httpapi
* Don't rewrite remote paths when remote is secretly local (#40259)Nathaniel Case2018-05-172-0/+4
| | | | | | | | | | | | | | * Don't rewrite remote paths when remote is secretly local * Remote overriding is configurable in connection * Use c.DEFAULT_LOCAL_TMP instead of remote_tmp * Remove remote_is_local from ConnectionBase * remote_is_local->_remote_is_local * Add warning signs to _remote_is_local and explanatory comments to its use
* Rename persistent_connection_timeout to connect_timeout in INI section (#40260)Ricardo Carrillo Cruz2018-05-161-1/+1
|