community.general/lib/ansible/plugins/connection
Ganesh Nalawade 90cd87f950
Fix debug logs failing with persistent connection (#33049)
* Fix debug logs failing with persistent connection

Fixes #33047

*  As debug logs are written on stdout, it interrupts
   the communication between ansible-connection(background)
   process and main process. To avoid this add a string similar
   to exactly identify the response string.

*  Remove unwanted code in ansible-connection

*  Fix review comments

* Fix spurious log emitted on ansible-connection stdout issue

*  ansible-connection which runs as a background process sends a
   json string (contains response received from remote device)
   to foreground ansible-playbook process over stdout.

*  If in case debug flag is enabled the connection_loader api
   invoked from ansible-connection `ssh = connection_loader.get('ssh', class_only=True)`
   results in emitting debug logs on stdout. This  spurious log
   interfere with the actual response and results in failure while
   reading json string in ansible-playbook process

* To avoid this save stdout of ansible-connection and redirect it string
  buffer to accumulate all the logs emitted by core API's

* Add these logs in `result['messages']` which is send a json string after reinstating saved stdout

*  Remove unwanted code in ansible-connection

* Fix review comment
2018-01-25 02:48:45 +05:30
..
__init__.py Temporary (#31677) 2018-01-15 21:15:04 -08:00
buildah.py Port ansible doc for plugins to use DOCUMENTATION variables 2017-09-11 18:34:09 -07:00
chroot.py Port ansible doc for plugins to use DOCUMENTATION variables 2017-09-11 18:34:09 -07:00
docker.py use `docker exec` in case `docker cp` failed. (#26571) 2017-12-13 15:30:30 -06:00
funcd.py Config continued (#31024) 2017-11-16 13:49:57 -05:00
iocage.py Python 2.6 `str.format()` compatibility fixes. 2018-01-10 14:08:11 -08:00
jail.py Port ansible doc for plugins to use DOCUMENTATION variables 2017-09-11 18:34:09 -07:00
kubectl.py Add K8s inventory plugin (#34920) 2018-01-20 08:50:01 -05:00
libvirt_lxc.py Port ansible doc for plugins to use DOCUMENTATION variables 2017-09-11 18:34:09 -07:00
local.py Port ansible doc for plugins to use DOCUMENTATION variables 2017-09-11 18:34:09 -07:00
lxc.py Port ansible doc for plugins to use DOCUMENTATION variables 2017-09-11 18:34:09 -07:00
lxd.py Port ansible doc for plugins to use DOCUMENTATION variables 2017-09-11 18:34:09 -07:00
netconf.py adds support for using connection=netconf (#33400) 2018-01-24 21:48:41 +05:30
network_cli.py Fix enable subprompt (#34723) 2018-01-24 07:24:22 -07:00
oc.py Add K8s inventory plugin (#34920) 2018-01-20 08:50:01 -05:00
paramiko_ssh.py Minor spelling fix (#33822) 2017-12-12 23:13:27 +01:00
persistent.py Fix debug logs failing with persistent connection (#33049) 2018-01-25 02:48:45 +05:30
saltstack.py Port ansible doc for plugins to use DOCUMENTATION variables 2017-09-11 18:34:09 -07:00
ssh.py Ensure that the become password is written on py3 in the ssh connection plugin. Fixes #34727 2018-01-18 09:32:22 -08:00
winrm.py win_script: work when argument exceeds stdin buffer size (#33855) 2018-01-18 11:28:33 +10:00
zone.py typo fix (#33810) 2017-12-12 12:25:53 +00:00