From bcac289667447b118d672ef135bc4f36c62107c4 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Sat, 27 Apr 2013 11:50:53 -0400 Subject: [PATCH] Cows don't need to display brackets around strings. --- lib/ansible/callbacks.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/ansible/callbacks.py b/lib/ansible/callbacks.py index 487da7666f..33785dfe62 100644 --- a/lib/ansible/callbacks.py +++ b/lib/ansible/callbacks.py @@ -200,6 +200,10 @@ def regular_generic_msg(hostname, result, oneline, caption): def banner(msg): if cowsay: + if msg.find(": [") != -1: + msg = msg.replace("[","") + if msg.endswith("]"): + msg = msg[:-1] runcmd = [cowsay,"-W", "60"] if noncow: runcmd.append('-f')