From 706cfd9adeb8743663985263ae5abdfedaf4d8cc Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sun, 15 Jul 2012 08:50:23 -0400 Subject: [PATCH] Misc cleanup -- moved function out of utils, removed debug statement. --- lib/ansible/callbacks.py | 5 ++++- lib/ansible/playbook/play.py | 1 - lib/ansible/utils.py | 7 ------- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index ff68fc23ff..32dbcedddd 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -239,7 +239,10 @@ class PlaybookCallbacks(object): pass def on_task_start(self, name, is_conditional): - print banner(utils.task_start_msg(name, is_conditional)) + msg = "TASK: [%s]" % name + if is_conditional: + msg = "NOTIFIED: [%s]" % name + print banner(msg) def on_vars_prompt(self, varname, private=True): msg = 'input for %s: ' % varname diff --git a/lib/ansible/playbook/play.py b/lib/ansible/playbook/play.py index d96473e8bf..590acec240 100644 --- a/lib/ansible/playbook/play.py +++ b/lib/ansible/playbook/play.py @@ -64,7 +64,6 @@ class Play(object): self.transport = ds.get('connection', self.playbook.transport) self.tags = ds.get('tags', None) self.gather_facts = ds.get('gather_facts', True) - print "self.gather_facts: %s" % self.gather_facts self._update_vars_files_for_host(None) diff --git a/lib/ansible/utils.py b/lib/ansible/utils.py index a53092a981..70e5014e96 100644 --- a/lib/ansible/utils.py +++ b/lib/ansible/utils.py @@ -63,13 +63,6 @@ def smjson(result): result2 = result.copy() return json.dumps(result2, sort_keys=True) -def task_start_msg(name, conditional): - # FIXME: move to callbacks code - if conditional: - return "NOTIFIED: [%s]" % name - else: - return "TASK: [%s]" % name - def regular_generic_msg(hostname, result, oneline, caption): ''' output on the result of a module run that is not command ''' if not oneline: