mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
minor cosmetic changes to list options
This commit is contained in:
parent
056602c424
commit
884435a1aa
1 changed files with 3 additions and 7 deletions
|
@ -150,7 +150,7 @@ class PlaybookCLI(CLI):
|
||||||
if isinstance(results, list):
|
if isinstance(results, list):
|
||||||
for p in results:
|
for p in results:
|
||||||
|
|
||||||
self.display.display('\nplaybook: %s\n' % p['playbook'])
|
self.display.display('\nplaybook: %s' % p['playbook'])
|
||||||
i = 1
|
i = 1
|
||||||
for play in p['plays']:
|
for play in p['plays']:
|
||||||
if play.name:
|
if play.name:
|
||||||
|
@ -161,7 +161,6 @@ class PlaybookCLI(CLI):
|
||||||
msg = "\n PLAY: %s" % (playname)
|
msg = "\n PLAY: %s" % (playname)
|
||||||
if self.options.listtags:
|
if self.options.listtags:
|
||||||
mytags = set(play.tags)
|
mytags = set(play.tags)
|
||||||
msg += '\n total tags: %d' % (len(mytags))
|
|
||||||
msg += '\n tags: [%s]' % (','.join(mytags))
|
msg += '\n tags: [%s]' % (','.join(mytags))
|
||||||
|
|
||||||
if self.options.listhosts:
|
if self.options.listhosts:
|
||||||
|
@ -175,15 +174,12 @@ class PlaybookCLI(CLI):
|
||||||
if self.options.listtags or self.options.listtasks:
|
if self.options.listtags or self.options.listtasks:
|
||||||
j = 1
|
j = 1
|
||||||
taskmsg = ' tasks:'
|
taskmsg = ' tasks:'
|
||||||
|
|
||||||
for task in play.get_tasks():
|
for task in play.get_tasks():
|
||||||
taskmsg += "\n %s" % task
|
taskmsg += "\n %s" % task
|
||||||
|
|
||||||
if self.options.listtags:
|
if self.options.listtags:
|
||||||
pass
|
pass
|
||||||
#for task in play.get_tasks():
|
#taskmsg += " %s" % ','.join(mytags.union(set(task.tags))) #FIXME: find out how to get task tags
|
||||||
# mytags.union(set(task.tags))
|
|
||||||
#self.display.display(" %s" % ','.join(mytags))
|
|
||||||
|
|
||||||
j = j + 1
|
j = j + 1
|
||||||
self.display.display(taskmsg)
|
self.display.display(taskmsg)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue