|
|
@ -47,7 +47,7 @@ class Connection(ConnectionBase):
|
|
|
|
transport = 'jail'
|
|
|
|
transport = 'jail'
|
|
|
|
# Pipelining may work. Someone needs to test by setting this to True and
|
|
|
|
# Pipelining may work. Someone needs to test by setting this to True and
|
|
|
|
# having pipelining=True in their ansible.cfg
|
|
|
|
# having pipelining=True in their ansible.cfg
|
|
|
|
has_pipelining = False
|
|
|
|
has_pipelining = True
|
|
|
|
# Some become_methods may work in v2 (sudo works for other chroot-based
|
|
|
|
# Some become_methods may work in v2 (sudo works for other chroot-based
|
|
|
|
# plugins while su seems to be failing). If some work, check chroot.py to
|
|
|
|
# plugins while su seems to be failing). If some work, check chroot.py to
|
|
|
|
# see how to disable just some methods.
|
|
|
|
# see how to disable just some methods.
|
|
|
@ -121,13 +121,6 @@ class Connection(ConnectionBase):
|
|
|
|
''' run a command on the jail '''
|
|
|
|
''' run a command on the jail '''
|
|
|
|
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
|
|
|
super(Connection, self).exec_command(cmd, in_data=in_data, sudoable=sudoable)
|
|
|
|
|
|
|
|
|
|
|
|
# TODO: Check whether we can send the command to stdin via
|
|
|
|
|
|
|
|
# p.communicate(in_data)
|
|
|
|
|
|
|
|
# If we can, then we can change this plugin to has_pipelining=True and
|
|
|
|
|
|
|
|
# remove the error if in_data is given.
|
|
|
|
|
|
|
|
if in_data:
|
|
|
|
|
|
|
|
raise AnsibleError("Internal Error: this module does not support optimized module pipelining")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
p = self._buffered_exec_command(cmd)
|
|
|
|
p = self._buffered_exec_command(cmd)
|
|
|
|
|
|
|
|
|
|
|
|
stdout, stderr = p.communicate(in_data)
|
|
|
|
stdout, stderr = p.communicate(in_data)
|
|
|
|