Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions connection_plugins/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@ def exec_command(self, cmd, tmp_path, sudo_user=None, sudoable=False,
"support optimized module pipelining")

if sudoable and sudo_user:
raise errors.AnsibleError("Internal Error: this module does not "
"support running commands via sudo")
cmd = "sudo -u %s %s" % (sudo_user, cmd)

if executable:
local_cmd = [self.docker_cmd, "exec", self.host, executable,
Expand Down