summaryrefslogtreecommitdiff
path: root/ansible/connection_plugins
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2018-02-25 07:15:53 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2018-02-25 07:15:53 +0100
commit37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a (patch)
tree9e5bd01097ccadf6de2ba59dc264df51cd335665 /ansible/connection_plugins
parent443efffc41984ac604ffa733dd936fecd83006dd (diff)
downloadinfra-37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a.tar.gz
infra-37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a.tar.bz2
infra-37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a.tar.xz
infra-37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a.zip
wip
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