From 81f55ff8ff8077b9420f7e98b2256cd26ba6a467 Mon Sep 17 00:00:00 2001 From: Dagobert Michelsen Date: Wed, 18 Feb 2015 16:52:44 +0100 Subject: [PATCH] Adjust leftovers from chroot --- lib/ansible/runner/connection_plugins/zone.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/lib/ansible/runner/connection_plugins/zone.py b/lib/ansible/runner/connection_plugins/zone.py index 2a5384f121c..16bef1a2134 100644 --- a/lib/ansible/runner/connection_plugins/zone.py +++ b/lib/ansible/runner/connection_plugins/zone.py @@ -84,7 +84,7 @@ class Connection(object): self.port = port def connect(self, port=None): - ''' connect to the chroot; nothing to do here ''' + ''' connect to the zone; nothing to do here ''' vvv("THIS IS A LOCAL ZONE DIR", host=self.zone) @@ -100,17 +100,15 @@ class Connection(object): #def exec_command(self, cmd, tmp_path, sudo_user=None, sudoable=False, executable='/bin/sh', in_data=None, su=None, su_user=None): def exec_command(self, cmd, tmp_path, sudo_user=None, sudoable=False, executable=None, in_data=None, su=None, su_user=None): - ''' run a command on the chroot ''' + ''' run a command on the zone ''' - # XXX: TBD 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") - # XXX: Allow doing stuff as -l - # We enter chroot as root so sudo stuff can be ignored + # We enter zone as root so sudo stuff can be ignored if executable == '/bin/sh': executable = None local_cmd = self._generate_cmd(executable, cmd) @@ -143,7 +141,7 @@ class Connection(object): raise errors.AnsibleError("failed to transfer file to %s" % out_path) def put_file(self, in_path, out_path): - ''' transfer a file from local to chroot ''' + ''' transfer a file from local to zone ''' out_path = self._normalize_path(out_path, self.get_zone_path()) vvv("PUT %s TO %s" % (in_path, out_path), host=self.zone) @@ -151,7 +149,7 @@ class Connection(object): self._copy_file(in_path, out_path) def fetch_file(self, in_path, out_path): - ''' fetch a file from chroot to local ''' + ''' fetch a file from zone to local ''' in_path = self._normalize_path(in_path, self.get_zone_path()) vvv("FETCH %s TO %s" % (in_path, out_path), host=self.zone)