mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 21:00:22 -07:00
Merge pull request #1753 from skvidal/devel
make --list-hosts expand out extra vars in the hosts: field
This commit is contained in:
commit
2fd7d7149f
1 changed files with 2 additions and 1 deletions
|
@ -131,7 +131,8 @@ def main(args):
|
|||
label = 'unnamed'
|
||||
if 'name' in play:
|
||||
label = play['name']
|
||||
hosts = pb.inventory.list_hosts(play['hosts'])
|
||||
tmp_hosts = utils.template(pb.basedir, play['hosts'], extra_vars)
|
||||
hosts = pb.inventory.list_hosts(tmp_hosts)
|
||||
print ' hosts in play %s (%s): #%d' % (playnum, label, len(hosts))
|
||||
for host in hosts:
|
||||
print ' %s' % host
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue