mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
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.
This commit is contained in:
parent
8e0af04c3b
commit
ad3d3c7379
1 changed files with 2 additions and 1 deletions
|
@ -247,6 +247,7 @@ def main(args):
|
|||
if getattr(task, 'name', None) is not None:
|
||||
# meta tasks have no names
|
||||
print ' %s' % task.name
|
||||
if options.listhosts or options.listtasks:
|
||||
print ''
|
||||
continue
|
||||
|
||||
|
|
Loading…
Reference in a new issue