mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
use readlines on stdout so we'll block on long running commands
This commit is contained in:
parent
7eb2dd2dee
commit
e0e98d10ce
1 changed files with 2 additions and 1 deletions
|
@ -25,6 +25,7 @@ from itertools import izip
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
import traceback
|
import traceback
|
||||||
|
import select
|
||||||
|
|
||||||
# non-core
|
# non-core
|
||||||
import paramiko
|
import paramiko
|
||||||
|
@ -143,7 +144,7 @@ class Runner(object):
|
||||||
def _exec_command(self, conn, cmd):
|
def _exec_command(self, conn, cmd):
|
||||||
''' execute a command over SSH '''
|
''' execute a command over SSH '''
|
||||||
stdin, stdout, stderr = conn.exec_command(cmd)
|
stdin, stdout, stderr = conn.exec_command(cmd)
|
||||||
results = stdout.read()
|
results = "\n".join(stdout.readlines())
|
||||||
return results
|
return results
|
||||||
|
|
||||||
def _copy_module(self, conn):
|
def _copy_module(self, conn):
|
||||||
|
|
Loading…
Reference in a new issue