summaryrefslogtreecommitdiffstats
path: root/callback_plugins
diff options
context:
space:
mode:
authorSeth Vidal <skvidal@fedoraproject.org>2013-07-05 18:24:39 -0400
committerSeth Vidal <skvidal@fedoraproject.org>2013-07-05 18:24:39 -0400
commit8455e65fbf1bbc371a874ffd027a02ff5e708b7a (patch)
tree5c7b2d61e000606fe9d1250cff13a17e2d940275 /callback_plugins
parenta8f0718281f0e8b50a247c6f5c4293173ca63440 (diff)
downloadansible-8455e65fbf1bbc371a874ffd027a02ff5e708b7a.tar.gz
ansible-8455e65fbf1bbc371a874ffd027a02ff5e708b7a.tar.xz
ansible-8455e65fbf1bbc371a874ffd027a02ff5e708b7a.zip
try to make log detail show check vs actual changes
Diffstat (limited to 'callback_plugins')
-rw-r--r--callback_plugins/logdetail.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/callback_plugins/logdetail.py b/callback_plugins/logdetail.py
index 3d19fcca8..06d04a98a 100644
--- a/callback_plugins/logdetail.py
+++ b/callback_plugins/logdetail.py
@@ -130,7 +130,9 @@ class LogMech(object):
if category == 'OK' and data.get('changed', False):
category = 'CHANGED'
-
+
+ if self.play_info.check:
+ category = 'CHECK:' + category
fd = open(self.logpath_play + '/' + host + '.log', 'a')
now = time.strftime(TIME_FORMAT, time.localtime())
@@ -253,6 +255,7 @@ class CallbackModule(object):
pb_info['extra_vars'] = play.playbook.extra_vars
pb_info['inventory'] = play.playbook.inventory.host_list
pb_info['playbook_checksum'] = utils.md5(path)
+ pb_info['check'] = play.playbook.check
logmech.play_log(json.dumps(pb_info, indent=4))
self._play_count += 1
@@ -262,6 +265,7 @@ class CallbackModule(object):
info['hosts'] = play.hosts
info['transport'] = play.transport
info['number'] = self._play_count
+ info['check'] = play.playbook.check
logmech.play_info = info
logmech.play_log(json.dumps(info, indent=4))