Move role cache into the play to avoid roles crossing play boundaries

This commit is contained in:
James Cammarata 2015-07-10 02:43:53 -04:00
parent b520d5bc60
commit f8ddf2eb04
4 changed files with 15 additions and 24 deletions

View file

@ -25,7 +25,6 @@ from ansible import constants as C
from ansible.errors import *
from ansible.executor.task_queue_manager import TaskQueueManager
from ansible.playbook import Playbook
from ansible.playbook.role import role_reset_has_run
from ansible.plugins import module_loader
from ansible.template import Templar
@ -84,9 +83,6 @@ class PlaybookExecutor:
self._display.vv('%d plays in %s' % (len(plays), playbook_path))
for play in plays:
# clear out the flag on all roles indicating they had any tasks run
role_reset_has_run()
# clear any filters which may have been applied to the inventory
self._inventory.remove_restriction()