Commit 90c70d7c by Michael DeHaan

Merge pull request #412 from mgwilliams/bug-include-handlers-templating

template path for handlers: include
parents 0de0a999 0844db44
...@@ -172,9 +172,9 @@ class PlayBook(object): ...@@ -172,9 +172,9 @@ class PlayBook(object):
def _include_handlers(self, play, handler, dirname, new_handlers): def _include_handlers(self, play, handler, dirname, new_handlers):
''' load handlers from external files ''' ''' load handlers from external files '''
path = utils.path_dwim(dirname, handler['include'])
inject_vars = self._get_vars(play, dirname) inject_vars = self._get_vars(play, dirname)
path = utils.template(handler['include'], inject_vars, SETUP_CACHE)
path = utils.path_dwim(dirname, path)
included = utils.template_from_file(path, inject_vars, SETUP_CACHE) included = utils.template_from_file(path, inject_vars, SETUP_CACHE)
included = utils.parse_yaml(included) included = utils.parse_yaml(included)
for x in included: for x in included:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment