Updated connection plugin for ansible 2.3 support

This change allows the connection plugin to work with Ansible 2.3.
Upstream changes now require the use of the public method.

Change-Id: I044aa442f116cbbf5fbdb6e6ca0b691c04c56a2d
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit is contained in:
Kevin Carter 2017-03-23 13:26:20 -05:00
parent cb7ad3f484
commit 9974cebec7
No known key found for this signature in database
GPG Key ID: 69FEFFC5E2D9273F
1 changed files with 2 additions and 2 deletions

View File

@ -54,7 +54,7 @@ class Connection(SSH.Connection):
if self._container_check() or self._chroot_check():
self.host = self._play_context.remote_addr = self.physical_host
def _exec_command(self, cmd, in_data=None, sudoable=True):
def exec_command(self, cmd, in_data=None, sudoable=True):
"""run a command on the remote host."""
if self._container_check():
@ -65,7 +65,7 @@ class Connection(SSH.Connection):
chroot_command = 'chroot %s' % self.chroot_path
cmd = '%s %s' % (chroot_command, cmd)
return super(Connection, self)._exec_command(cmd, in_data, sudoable)
return super(Connection, self).exec_command(cmd, in_data, sudoable)
def _chroot_check(self):
if self.chroot_path: