From e8751baaf3d56591ea69a78c047b7bf7c72560bd Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Wed, 14 Mar 2012 20:00:09 -0400 Subject: [PATCH] Remove remote log function as it's only used in one place now --- lib/ansible/runner.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index a68cb596458..063dd8a413d 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -451,19 +451,13 @@ class Runner(object): # ***************************************************** - def remote_log(self, conn, msg): - ''' this is the function we use to log things ''' - - # FIXME: TODO: make this optional as it's executed a lot - stdin, stdout, stderr = conn.exec_command('/usr/bin/logger -t ansible -p auth.info "%s"' % msg) - - # ***************************************************** - def _exec_command(self, conn, cmd): ''' execute a command string over SSH, return the output ''' msg = '%s: %s' % (self.module_name, cmd) - self.remote_log(conn, msg) + # log remote command execution + conn.exec_command('/usr/bin/logger -t ansible -p auth.info "%s"' % msg) + # now run actual command stdin, stdout, stderr = conn.exec_command(cmd) return "\n".join(stdout.readlines())