diff options
author | Michael DeHaan <michael.dehaan@gmail.com> | 2014-03-16 19:40:13 +0100 |
---|---|---|
committer | Michael DeHaan <michael.dehaan@gmail.com> | 2014-03-16 19:40:13 +0100 |
commit | 0dde3b708062d2406df8aa335d9c7b7e036731c4 (patch) | |
tree | ef59559ae1db20afbdf76a7e9ed35e0840dbda5e /bin/ansible-playbook | |
parent | Merge pull request #6515 from lotia/fix-acl-doc-and-error (diff) | |
parent | make --list-tasks honor --limit (diff) | |
download | ansible-0dde3b708062d2406df8aa335d9c7b7e036731c4.tar.xz ansible-0dde3b708062d2406df8aa335d9c7b7e036731c4.zip |
Merge pull request #5895 from trbs/listtasks_honors_limit
make --list-tasks honor --limit
Diffstat (limited to 'bin/ansible-playbook')
-rwxr-xr-x | bin/ansible-playbook | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/ansible-playbook b/bin/ansible-playbook index 5aa020a924..be178a6565 100755 --- a/bin/ansible-playbook +++ b/bin/ansible-playbook @@ -206,12 +206,14 @@ def main(args): playnum += 1 play = ansible.playbook.Play(pb, play_ds, play_basedir) label = play.name + hosts = pb.inventory.list_hosts(play.hosts) if options.listhosts: - hosts = pb.inventory.list_hosts(play.hosts) print ' play #%d (%s): host count=%d' % (playnum, label, len(hosts)) for host in hosts: print ' %s' % host if options.listtasks: + if options.subset and not hosts: + continue matched_tags, unmatched_tags = play.compare_tags(pb.only_tags) # Remove skipped tasks |