Skip to content

Commit

Permalink
Merge pull request ansible#7972 from mscherer/fix_lxc
Browse files Browse the repository at this point in the history
libvirt_lxc: Fix exec_command prototype for the plugin
  • Loading branch information
mpdehaan committed Jun 29, 2014
2 parents 2d53bc4 + f0a7139 commit 14cf3c4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/ansible/runner/connection_plugins/libvirt_lxc.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,15 @@ def _generate_cmd(self, executable, cmd):
local_cmd = '%s -q -c lxc:/// lxc-enter-namespace %s -- %s' % (self.cmd, self.lxc, cmd)
return local_cmd

def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False, executable='/bin/sh'):
def exec_command(self, cmd, tmp_path, sudo_user, sudoable=False, executable='/bin/sh', in_data=None, su=None, su_user=None):
''' run a command on the chroot '''

if su or su_user:
raise errors.AnsibleError("Internal Error: this module does not support running commands via su")

if in_data:
raise errors.AnsibleError("Internal Error: this module does not support optimized module pipelining")

# We enter lxc as root so sudo stuff can be ignored
local_cmd = self._generate_cmd(executable, cmd)

Expand Down

0 comments on commit 14cf3c4

Please sign in to comment.