Skip to content

Instantly share code, notes, and snippets.

@mkrizek
Created November 28, 2018 15:10
Show Gist options
  • Save mkrizek/e7555836115a4c4ec127eea89dab0c17 to your computer and use it in GitHub Desktop.
Save mkrizek/e7555836115a4c4ec127eea89dab0c17 to your computer and use it in GitHub Desktop.
diff --git a/lib/ansible/executor/task_queue_manager.py b/lib/ansible/executor/task_queue_manager.py
index 67a741b989..844ab621a8 100644
--- a/lib/ansible/executor/task_queue_manager.py
+++ b/lib/ansible/executor/task_queue_manager.py
@@ -232,7 +232,7 @@ class TaskQueueManager:
new_play = play.copy()
new_play.post_validate(templar)
- new_play.handlers = new_play.compile_roles_handlers() + new_play.handlers
+ new_play.handlers = new_play.handlers + new_play.compile_roles_handlers()
self.hostvars = HostVars(
inventory=self._inventory,
diff --git a/lib/ansible/playbook/role_include.py b/lib/ansible/playbook/role_include.py
index c84342a2fc..5f0e547a75 100644
--- a/lib/ansible/playbook/role_include.py
+++ b/lib/ansible/playbook/role_include.py
@@ -105,7 +105,7 @@ class IncludeRole(TaskInclude):
handlers = actual_role.get_handler_blocks(play=myplay)
for h in handlers:
h._parent = p_block
- myplay.handlers = myplay.handlers + handlers
+ myplay.handlers = handlers + myplay.handlers
return blocks, handlers
@staticmethod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment