From 37d104f7d74fd7b5fd6b65caf6f4d0dcf0cd614a Mon Sep 17 00:00:00 2001
From: Trygve Laugstøl <trygvis@inamo.no>
Date: Sun, 25 Feb 2018 07:15:53 +0100
Subject: wip

---
 ansible/connection_plugins/lxc_ssh.py  |   8 ++++----
 ansible/connection_plugins/lxc_ssh.pyc | Bin 34768 -> 34788 bytes
 2 files changed, 4 insertions(+), 4 deletions(-)

(limited to 'ansible/connection_plugins')

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
Binary files a/ansible/connection_plugins/lxc_ssh.pyc and b/ansible/connection_plugins/lxc_ssh.pyc differ
-- 
cgit v1.2.3