From ad3d3c7379a6538dea1d997e8aee0060f96b57e5 Mon Sep 17 00:00:00 2001 From: Serge van Ginderachter Date: Fri, 22 Aug 2014 15:32:08 +0200 Subject: [PATCH] Avoid multiple blank lines with --syntax-check Only print a blank line between plays when also doing --list-hosts and/or --list-tasks, otherwise this output just a long list of blank lines, one for each play. --- bin/ansible-playbook | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/ansible-playbook b/bin/ansible-playbook index 27d920a81ef..96e87de3eb0 100755 --- a/bin/ansible-playbook +++ b/bin/ansible-playbook @@ -247,7 +247,8 @@ def main(args): if getattr(task, 'name', None) is not None: # meta tasks have no names print ' %s' % task.name - print '' + if options.listhosts or options.listtasks: + print '' continue if options.syntax: