From 0f6669fafe9a3a26a21c092fe6a5578741c4339f Mon Sep 17 00:00:00 2001 From: Seth Vidal Date: Tue, 11 Dec 2012 14:12:10 -0500 Subject: [PATCH] make --list-hosts expand out extra vars in the hosts: field --- bin/ansible-playbook | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/ansible-playbook b/bin/ansible-playbook index 2d56df2d2a1..7375017a7ed 100755 --- a/bin/ansible-playbook +++ b/bin/ansible-playbook @@ -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