From dd07011a65d6338ac3e1c81cc0e936afce553c7f Mon Sep 17 00:00:00 2001 From: Dag Wieers Date: Wed, 7 Nov 2012 23:51:44 +0100 Subject: [PATCH] Only print 'Invoked with' if there are arguments to the module This closes #1519 --- lib/ansible/module_common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ansible/module_common.py b/lib/ansible/module_common.py index 025bd1e1a10..a4d41aae6bc 100644 --- a/lib/ansible/module_common.py +++ b/lib/ansible/module_common.py @@ -542,7 +542,10 @@ class AnsibleModule(object): syslog.openlog('ansible-%s' % os.path.basename(__file__)) for arg in log_args: msg = msg + arg + '=' + str(log_args[arg]) + ' ' - syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % msg) + if msg: + syslog.syslog(syslog.LOG_NOTICE, 'Invoked with %s' % msg) + else: + syslog.syslog(syslog.LOG_NOTICE, 'Invoked') def get_bin_path(self, arg, required=False, opt_dirs=[]): '''