|
|
@ -159,8 +159,9 @@ class PlaybookCLI(CLI):
|
|
|
|
playname = '#' + str(i)
|
|
|
|
playname = '#' + str(i)
|
|
|
|
|
|
|
|
|
|
|
|
msg = "\n PLAY: %s" % (playname)
|
|
|
|
msg = "\n PLAY: %s" % (playname)
|
|
|
|
if self.options.listtags:
|
|
|
|
mytags = set()
|
|
|
|
mytags = set(play.tags)
|
|
|
|
if self.options.listtags and play.tags:
|
|
|
|
|
|
|
|
mytags = mytags.union(set(play.tags))
|
|
|
|
msg += '\n tags: [%s]' % (','.join(mytags))
|
|
|
|
msg += '\n tags: [%s]' % (','.join(mytags))
|
|
|
|
|
|
|
|
|
|
|
|
if self.options.listhosts:
|
|
|
|
if self.options.listhosts:
|
|
|
@ -172,15 +173,19 @@ class PlaybookCLI(CLI):
|
|
|
|
self.display.display(msg)
|
|
|
|
self.display.display(msg)
|
|
|
|
|
|
|
|
|
|
|
|
if self.options.listtags or self.options.listtasks:
|
|
|
|
if self.options.listtags or self.options.listtasks:
|
|
|
|
j = 1
|
|
|
|
|
|
|
|
taskmsg = ' tasks:'
|
|
|
|
taskmsg = ' tasks:'
|
|
|
|
|
|
|
|
|
|
|
|
for task in play.get_tasks():
|
|
|
|
for block in play.compile():
|
|
|
|
|
|
|
|
if not block.has_tasks():
|
|
|
|
|
|
|
|
continue
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
j = 1
|
|
|
|
|
|
|
|
for task in block.block:
|
|
|
|
taskmsg += "\n %s" % task
|
|
|
|
taskmsg += "\n %s" % task
|
|
|
|
if self.options.listtags:
|
|
|
|
if self.options.listtags and task.tags:
|
|
|
|
pass
|
|
|
|
taskmsg += "\n tags: [%s]" % ','.join(mytags.union(set(task.tags)))
|
|
|
|
#taskmsg += " %s" % ','.join(mytags.union(set(task.tags))) #FIXME: find out how to get task tags
|
|
|
|
|
|
|
|
j = j + 1
|
|
|
|
j = j + 1
|
|
|
|
|
|
|
|
|
|
|
|
self.display.display(taskmsg)
|
|
|
|
self.display.display(taskmsg)
|
|
|
|
|
|
|
|
|
|
|
|
i = i + 1
|
|
|
|
i = i + 1
|
|
|
|