Skip to content

Commit

Permalink
make --list-hosts expand out extra vars in the hosts: field
Browse files Browse the repository at this point in the history
  • Loading branch information
skvidal committed Dec 11, 2012
1 parent 959a461 commit 0f6669f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bin/ansible-playbook
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0f6669f

Please sign in to comment.