diff --git a/lib/ansible/runner/connection_plugins/libvirt_lxc.py b/lib/ansible/runner/connection_plugins/libvirt_lxc.py index b1de672ddd8..c6cf11f2667 100644 --- a/lib/ansible/runner/connection_plugins/libvirt_lxc.py +++ b/lib/ansible/runner/connection_plugins/libvirt_lxc.py @@ -65,9 +65,15 @@ class Connection(object): 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)