diff options
author | Seth Vidal <skvidal@fedoraproject.org> | 2012-04-02 19:29:12 +0200 |
---|---|---|
committer | Seth Vidal <skvidal@fedoraproject.org> | 2012-04-02 19:29:12 +0200 |
commit | 04aecdcf347ad56e7328718884533a6d864ca3b9 (patch) | |
tree | 5060d2c4f4c137d811336fa626b00d028e31d2b2 | |
parent | catch all exceptions and emit sensible errors - if we have a config file erro... (diff) | |
download | ansible-04aecdcf347ad56e7328718884533a6d864ca3b9.tar.xz ansible-04aecdcf347ad56e7328718884533a6d864ca3b9.zip |
before we run the actual module/command - emit what that would be to the logs
-rwxr-xr-x | lib/ansible/runner.py | 6 |
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 ) |