aboutsummaryrefslogtreecommitdiff
path: root/ansible/connection_plugins
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/connection_plugins')
-rw-r--r--ansible/connection_plugins/lxc_ssh.py8
-rw-r--r--ansible/connection_plugins/lxc_ssh.pycbin34768 -> 34788 bytes
2 files changed, 4 insertions, 4 deletions
diff --git a/ansible/connection_plugins/lxc_ssh.py b/ansible/connection_plugins/lxc_ssh.py
index 9f93305..2bb5352 100644
--- a/ansible/connection_plugins/lxc_ssh.py
+++ b/ansible/connection_plugins/lxc_ssh.py
@@ -1167,11 +1167,11 @@ class Connection(ConnectionBase):
cmd = ('cat > %s; echo -n done' % pipes.quote(out_path))
h = self.container_name
if (self.lxc_version == 2):
- lxc_cmd = 'lxc exec %s --mode=non-interactive -- /bin/sh -c %s' \
+ lxc_cmd = 'sudo lxc exec %s --mode=non-interactive -- /bin/sh -c %s' \
% (pipes.quote(h),
pipes.quote(cmd))
elif (self.lxc_version == 1):
- lxc_cmd = 'lxc-attach --name %s -- /bin/sh -c %s' \
+ lxc_cmd = 'sudo lxc-attach --name %s -- /bin/sh -c %s' \
% (pipes.quote(h),
pipes.quote(cmd))
if in_data:
@@ -1204,11 +1204,11 @@ class Connection(ConnectionBase):
cmd = ('cat < %s' % pipes.quote(in_path))
h = self.container_name
if (self.lxc_version == 2):
- lxc_cmd = 'lxc exec %s --mode=non-interactive -- /bin/sh -c %s' \
+ lxc_cmd = 'sudo lxc exec %s --mode=non-interactive -- /bin/sh -c %s' \
% (pipes.quote(h),
pipes.quote(cmd))
elif (self.lxc_version == 1):
- lxc_cmd = 'lxc-attach --name %s -- /bin/sh -c %s' \
+ lxc_cmd = 'sudo lxc-attach --name %s -- /bin/sh -c %s' \
% (pipes.quote(h),
pipes.quote(cmd))
diff --git a/ansible/connection_plugins/lxc_ssh.pyc b/ansible/connection_plugins/lxc_ssh.pyc
index 01895c8..9696804 100644
--- a/ansible/connection_plugins/lxc_ssh.pyc
+++ b/ansible/connection_plugins/lxc_ssh.pyc
Binary files differ