Created
January 3, 2019 14:01
-
-
Save mkrizek/f9db9264c0140937cec92e16066de100 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/ansible/plugins/strategy/__init__.py b/lib/ansible/plugins/strategy/__init__.py | |
index cd4050d8db..ee2cca5695 100644 | |
--- a/lib/ansible/plugins/strategy/__init__.py | |
+++ b/lib/ansible/plugins/strategy/__init__.py | |
@@ -875,15 +875,23 @@ class StrategyBase: | |
host_results = [] | |
for host in notified_hosts: | |
if not iterator.is_failed(host) or play_context.force_handlers: | |
- task_vars = self._variable_manager.get_vars(play=iterator._play, host=host, task=handler) | |
- self.add_tqm_variables(task_vars, play=iterator._play) | |
- self._queue_task(host, handler, task_vars, play_context) | |
+ if handler.action == 'meta': | |
+ if handler.name == 'flush_handler': | |
+ display.error('flush_handler meta task is not allowed as a handler, skipping...') | |
+ # TODO host_results.append(TaskResult) | |
+ # TODO run_once | |
+ host_results.extend(self._execute_meta(handler, play_context, iterator, host)) | |
+ else: | |
+ task_vars = self._variable_manager.get_vars(play=iterator._play, host=host, task=handler) | |
+ self.add_tqm_variables(task_vars, play=iterator._play) | |
+ self._queue_task(host, handler, task_vars, play_context) | |
if run_once: | |
break | |
# collect the results from the handler run | |
- host_results = self._wait_on_handler_results(iterator, handler, notified_hosts) | |
+ host_results += self._wait_on_handler_results(iterator, handler, notified_hosts) | |
+ import q; q(host_results) | |
try: | |
included_files = IncludedFile.process_include_results( | |
host_results, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment