mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user