mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 13:22:48 +00:00
Modify output banners to have constant length and use dashes instead
of "-" to be less visually heavy (unless cowsay is installed of course)
This commit is contained in:
@@ -143,7 +143,11 @@ def banner(msg):
|
||||
(out, err) = cmd.communicate()
|
||||
return "%s\n" % out
|
||||
else:
|
||||
return "\n%s ********************* " % msg
|
||||
width = 78 - len(msg)
|
||||
if width < 3:
|
||||
width = 3
|
||||
filler = "-" * width
|
||||
return "\n%s %s " % (msg, filler)
|
||||
|
||||
def command_generic_msg(hostname, result, oneline, caption):
|
||||
''' output the result of a command run '''
|
||||
|
||||
Reference in New Issue
Block a user