ansible/lib/ansible/executor
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
..
process include_role handlers bug fix (#26335) 2017-07-19 15:02:32 -05:00
__init__.py ansible/executor: PEP8 compliancy (#24695) 2017-05-30 18:13:53 +01:00
action_write_locks.py Facts Refresh (2.4 roadmap) (#23012) 2017-06-01 11:17:49 -04:00
module_common.py win_become: another option to support become flags for runas (#34551) 2018-01-19 13:58:10 -08:00
play_iterator.py Cache tasks as they are queued instead of en masse (#34752) 2018-01-15 09:49:58 -06:00
playbook_executor.py Allow variables to be used in vars_prompt (#32802) 2018-01-05 13:24:20 -06:00
stats.py Provide a way to explicitly invoke the debugger (#34006) 2018-01-09 13:50:07 -06:00
task_executor.py Fix debug logs failing with persistent connection (#33049) 2018-01-25 02:48:45 +05:30
task_queue_manager.py Config continued (#31024) 2017-11-16 13:49:57 -05:00
task_result.py failed, skipped, and unreachable all seem to be needed for various callbacks. Fixes #34716 (#34724) 2018-01-18 14:42:40 -06:00