Correct issue of handlers running on all hosts incorrectly

Also adds an integration test to catch this bug in the future.

Fixes #7559
This commit is contained in:
James Cammarata 2014-05-27 10:55:09 -05:00
parent 617e7eaf5b
commit cfd8c685d1
4 changed files with 24 additions and 9 deletions

View file

@ -355,7 +355,7 @@ class PlayBook(object):
def _run_task_internal(self, task):
''' run a particular module step in a playbook '''
hosts = self._trim_unavailable_hosts(task.play._play_hosts)
hosts = self._trim_unavailable_hosts(self.inventory.list_hosts(task.play._play_hosts))
self.inventory.restrict_to(hosts)
runner = ansible.runner.Runner(