Set ansible stdin to /dev/null

Without this, when using the nullwrap driver, ansible throws the
following exception:

  AttributeError: 'NoneType' object has no attribute 'isatty'

Change-Id: Ic2d769fa1a0a1faf173aa36d33b291065b44a18b
This commit is contained in:
James E. Blair 2017-10-16 15:07:10 -07:00
parent 0c45d8899f
commit 638b760067
1 changed files with 1 additions and 0 deletions

View File

@ -1300,6 +1300,7 @@ class AnsibleJob(object):
self.proc = popen( self.proc = popen(
cmd, cmd,
cwd=self.jobdir.work_root, cwd=self.jobdir.work_root,
stdin=subprocess.DEVNULL,
stdout=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT, stderr=subprocess.STDOUT,
preexec_fn=os.setsid, preexec_fn=os.setsid,