Properly template role dependency names

Fixes #12505
pull/12562/head
James Cammarata 9 years ago
parent f42f5e6740
commit 79e364d98b

@ -168,7 +168,7 @@ class Role(Base, Become, Conditional, Taggable):
# load the role's other files, if they exist
metadata = self._load_role_yaml('meta')
if metadata:
self._metadata = RoleMetadata.load(metadata, owner=self, loader=self._loader)
self._metadata = RoleMetadata.load(metadata, owner=self, variable_manager=self._variable_manager, loader=self._loader)
self._dependencies = self._load_dependencies()
else:
self._metadata = RoleMetadata()

@ -160,7 +160,10 @@ class RoleDefinition(Base, Become, Conditional, Taggable):
role_search_paths.append(self._role_basedir)
# now iterate through the possible paths and return the first one we find
all_vars = self._variable_manager.get_vars(loader=self._loader, play=self._play)
templar = Templar(loader=self._loader, variables=all_vars)
for path in role_search_paths:
path = templar.template(path)
role_path = unfrackpath(os.path.join(path, role_name))
if self._loader.path_exists(role_path):
return (role_name, role_path)

Loading…
Cancel
Save