diff options
author | Stephen Smoogen <smooge@redhat.com> | 2015-01-13 00:25:01 +0000 |
---|---|---|
committer | Stephen Smoogen <smooge@redhat.com> | 2015-01-13 00:25:01 +0000 |
commit | ca66b2b7abf7e1d66cfe1f2b929b4f7700f3cbe8 (patch) | |
tree | 6fd60fe2895223cdb6392f231b1d3f111f170d3b /callback_plugins | |
parent | a87f2b43257c0ef806bf57d8a79d0309e422b43e (diff) | |
download | ansible-ca66b2b7abf7e1d66cfe1f2b929b4f7700f3cbe8.tar.gz ansible-ca66b2b7abf7e1d66cfe1f2b929b4f7700f3cbe8.tar.xz ansible-ca66b2b7abf7e1d66cfe1f2b929b4f7700f3cbe8.zip |
and we make logfile names suck less.
Diffstat (limited to 'callback_plugins')
-rw-r--r-- | callback_plugins/logdetail.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/callback_plugins/logdetail.py b/callback_plugins/logdetail.py index cbf40b735..d4f05b4a5 100644 --- a/callback_plugins/logdetail.py +++ b/callback_plugins/logdetail.py @@ -138,7 +138,8 @@ class LogMech(object): elif self.play_info.get('check', False): category = 'CHECK:' + category - fd = open(self.logpath_play + '/' + host + '.log', 'a') + sanitize_host = host.replace(' ', '_').replace('>', '-') + fd = open(self.logpath_play + '/' + sanitize_host + '.log', 'a') now = time.strftime(TIME_FORMAT, time.localtime()) fd.write(MSG_FORMAT % dict(now=now, name=name, count=count, category=category, data=json.dumps(data))) fd.close() |