mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
added listhosts draft
fixed assert from list to new yaml ansible object taskqueue is now None when just listing
This commit is contained in:
@@ -133,7 +133,12 @@ def main(args):
|
||||
pbex = PlaybookExecutor(playbooks=args, inventory=inventory, variable_manager=variable_manager, loader=loader, options=options)
|
||||
|
||||
if options.listhosts:
|
||||
print('TODO: implement')
|
||||
i = 1
|
||||
for play in pbex.listhosts():
|
||||
print("\nplay #%d" % i)
|
||||
for host in sorted(play):
|
||||
print(" %s" % host)
|
||||
i = i + 1
|
||||
sys.exit(0)
|
||||
elif options.listtasks:
|
||||
print('TODO: implement')
|
||||
|
||||
Reference in New Issue
Block a user