Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improve output formating for playbook #576

Merged
merged 1 commit into from
Jul 12, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion bin/ansible-playbook
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def main(args):
print callbacks.banner("PLAY RECAP")
for h in hosts:
t = pb.stats.summarize(h)
print "%-30s : ok=%4s changed=%4s unreachable=%4s failed=%4s " % (h,
print "%-30s : ok=%-4s changed=%-4s unreachable=%-4s failed=%-4s " % (h,
t['ok'], t['changed'], t['unreachable'], t['failures']
)
print "\n"
Expand Down
6 changes: 3 additions & 3 deletions lib/ansible/callbacks.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def banner(msg):
(out, err) = cmd.communicate()
res = "%s\n" % out
else:
res = "%s ********************* \n" % msg
res = "\n%s ********************* " % msg
return res


Expand Down Expand Up @@ -190,7 +190,7 @@ def on_failed(self, host, results):
def on_ok(self, host, host_result):
# show verbose output for non-setup module results if --verbose is used
if not self.verbose or host_result.get("verbose_override",None) is not None:
print "ok: [%s]\n" % (host)
print "ok: [%s]" % (host)
else:
print "ok: [%s] => %s" % (host, utils.smjson(host_result))

Expand Down Expand Up @@ -225,7 +225,7 @@ def __init__(self, verbose=False):
self.verbose = verbose

def on_start(self):
print "\n"
pass

def on_notify(self, host, handler):
pass
Expand Down