diff --git a/lib/ansible/module_utils/basic.py b/lib/ansible/module_utils/basic.py index a15f0b31f0..9ff38fe1bb 100644 --- a/lib/ansible/module_utils/basic.py +++ b/lib/ansible/module_utils/basic.py @@ -773,10 +773,10 @@ class AnsibleModule(object): journal.sendv(*journal_args) except IOError, e: # fall back to syslog since logging to journal failed - syslog.openlog(module, 0, syslog.LOG_USER) + syslog.openlog(str(module), 0, syslog.LOG_USER) syslog.syslog(syslog.LOG_NOTICE, msg) else: - syslog.openlog(module, 0, syslog.LOG_USER) + syslog.openlog(str(module), 0, syslog.LOG_USER) syslog.syslog(syslog.LOG_NOTICE, msg) def get_bin_path(self, arg, required=False, opt_dirs=[]):