From 04aecdcf347ad56e7328718884533a6d864ca3b9 Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Mon, 2 Apr 2012 13:29:12 -0400 Subject: [PATCH] before we run the actual module/command - emit what that would be to the logs --- lib/ansible/runner.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py index 3d83640fb49..0295b1fb0cb 100755 --- a/lib/ansible/runner.py +++ b/lib/ansible/runner.py @@ -357,6 +357,12 @@ class Runner(object): cmd = "%s %s" % (remote_module_path, argsfile) else: cmd = " ".join([str(x) for x in [remote_module_path, async_jid, async_limit, async_module, argsfile]]) + + # log command as the full command not as the path to args file - helps with debugging + msg = '%s: "%s"' % (self.module_name, args) + conn.exec_command('/usr/bin/logger -t ansible -p auth.info "%s"' % msg, None) + + res, err = self._exec_command(conn, cmd, tmp, sudoable=True) return ( res, err, client_executed_str )