summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeth Vidal <skvidal@fedoraproject.org>2012-04-02 19:29:12 +0200
committerSeth Vidal <skvidal@fedoraproject.org>2012-04-02 19:29:12 +0200
commit04aecdcf347ad56e7328718884533a6d864ca3b9 (patch)
tree5060d2c4f4c137d811336fa626b00d028e31d2b2
parentcatch all exceptions and emit sensible errors - if we have a config file erro... (diff)
downloadansible-04aecdcf347ad56e7328718884533a6d864ca3b9.tar.xz
ansible-04aecdcf347ad56e7328718884533a6d864ca3b9.zip
before we run the actual module/command - emit what that would be to the logs
-rwxr-xr-xlib/ansible/runner.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ansible/runner.py b/lib/ansible/runner.py
index 3d83640fb4..0295b1fb0c 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 )