From 1b34a174157ebd2cf311db7cbdc1ff1b95fa7fd2 Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 3 Jan 2018 10:51:26 -0500 Subject: [PATCH] removed unused objects from include results proc --- lib/ansible/playbook/included_file.py | 8 +------- lib/ansible/plugins/strategy/__init__.py | 2 -- lib/ansible/plugins/strategy/free.py | 2 -- lib/ansible/plugins/strategy/linear.py | 2 -- 4 files changed, 1 insertion(+), 13 deletions(-) diff --git a/lib/ansible/playbook/included_file.py b/lib/ansible/playbook/included_file.py index 68f4712538a..6bcd631ce2f 100644 --- a/lib/ansible/playbook/included_file.py +++ b/lib/ansible/playbook/included_file.py @@ -52,15 +52,9 @@ class IncludedFile: return "%s (%s): %s" % (self._filename, self._args, self._hosts) @staticmethod - def process_include_results(results, tqm, iterator, inventory, loader, variable_manager): + def process_include_results(results, iterator, loader, variable_manager): included_files = [] - def get_original_host(host): - if host.name in inventory._hosts_cache: - return inventory._hosts_cache[host.name] - else: - return inventory.get_host(host.name) - for res in results: original_host = res._host diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py index 426e51aae0e..4b8730bedf0 100644 --- a/lib/ansible/plugins/strategy/__init__.py +++ b/lib/ansible/plugins/strategy/__init__.py @@ -791,9 +791,7 @@ class StrategyBase: try: included_files = IncludedFile.process_include_results( host_results, - self._tqm, iterator=iterator, - inventory=self._inventory, loader=self._loader, variable_manager=self._variable_manager ) diff --git a/lib/ansible/plugins/strategy/free.py b/lib/ansible/plugins/strategy/free.py index 12afbc1f07e..07e02cfb83b 100644 --- a/lib/ansible/plugins/strategy/free.py +++ b/lib/ansible/plugins/strategy/free.py @@ -180,9 +180,7 @@ class StrategyModule(StrategyBase): try: included_files = IncludedFile.process_include_results( host_results, - self._tqm, iterator=iterator, - inventory=self._inventory, loader=self._loader, variable_manager=self._variable_manager ) diff --git a/lib/ansible/plugins/strategy/linear.py b/lib/ansible/plugins/strategy/linear.py index a164ff50777..9bdc1274f4b 100644 --- a/lib/ansible/plugins/strategy/linear.py +++ b/lib/ansible/plugins/strategy/linear.py @@ -297,9 +297,7 @@ class StrategyModule(StrategyBase): try: included_files = IncludedFile.process_include_results( host_results, - self._tqm, iterator=iterator, - inventory=self._inventory, loader=self._loader, variable_manager=self._variable_manager )