summaryrefslogtreecommitdiffstats
path: root/bin/ansible-playbook
diff options
context:
space:
mode:
authorSerge van Ginderachter <serge@vanginderachter.be>2014-08-22 15:32:08 +0200
committerSerge van Ginderachter <serge@vanginderachter.be>2014-08-22 15:32:08 +0200
commitad3d3c7379a6538dea1d997e8aee0060f96b57e5 (patch)
treee8a849d0e24784d419e323b1a30282b2e72b7dc2 /bin/ansible-playbook
parentAdd TOC to galaxy docs. (diff)
downloadansible-ad3d3c7379a6538dea1d997e8aee0060f96b57e5.tar.xz
ansible-ad3d3c7379a6538dea1d997e8aee0060f96b57e5.zip
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.
Diffstat (limited to 'bin/ansible-playbook')
-rwxr-xr-xbin/ansible-playbook3
1 files changed, 2 insertions, 1 deletions
diff --git a/bin/ansible-playbook b/bin/ansible-playbook
index 27d920a81e..96e87de3eb 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: