Make sure all plugin loaders are loaded from roles and shared correctly (v2)

This commit is contained in:
James Cammarata
2015-05-01 23:48:11 -05:00
parent 0b836262f0
commit f310d13280
12 changed files with 80 additions and 45 deletions

View File

@@ -25,6 +25,7 @@ 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.template import Templar
from ansible.utils.color import colorize, hostcolor
from ansible.utils.debug import debug
@@ -80,8 +81,9 @@ class PlaybookExecutor:
# Create a temporary copy of the play here, so we can run post_validate
# on it without the templating changes affecting the original object.
all_vars = self._variable_manager.get_vars(loader=self._loader, play=play)
templar = Templar(loader=self._loader, variables=all_vars, fail_on_undefined=False)
new_play = play.copy()
new_play.post_validate(all_vars, fail_on_undefined=False)
new_play.post_validate(templar)
if self._tqm is None:
# we are just doing a listing