Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ansible
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenEdx
ansible
Commits
79e364d9
Commit
79e364d9
authored
Sep 29, 2015
by
James Cammarata
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Properly template role dependency names
Fixes #12505
parent
f42f5e67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
1 deletions
+4
-1
lib/ansible/playbook/role/__init__.py
+1
-1
lib/ansible/playbook/role/definition.py
+3
-0
No files found.
lib/ansible/playbook/role/__init__.py
View file @
79e364d9
...
@@ -168,7 +168,7 @@ class Role(Base, Become, Conditional, Taggable):
...
@@ -168,7 +168,7 @@ class Role(Base, Become, Conditional, Taggable):
# load the role's other files, if they exist
# load the role's other files, if they exist
metadata
=
self
.
_load_role_yaml
(
'meta'
)
metadata
=
self
.
_load_role_yaml
(
'meta'
)
if
metadata
:
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
()
self
.
_dependencies
=
self
.
_load_dependencies
()
else
:
else
:
self
.
_metadata
=
RoleMetadata
()
self
.
_metadata
=
RoleMetadata
()
...
...
lib/ansible/playbook/role/definition.py
View file @
79e364d9
...
@@ -160,7 +160,10 @@ class RoleDefinition(Base, Become, Conditional, Taggable):
...
@@ -160,7 +160,10 @@ class RoleDefinition(Base, Become, Conditional, Taggable):
role_search_paths
.
append
(
self
.
_role_basedir
)
role_search_paths
.
append
(
self
.
_role_basedir
)
# now iterate through the possible paths and return the first one we find
# 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
:
for
path
in
role_search_paths
:
path
=
templar
.
template
(
path
)
role_path
=
unfrackpath
(
os
.
path
.
join
(
path
,
role_name
))
role_path
=
unfrackpath
(
os
.
path
.
join
(
path
,
role_name
))
if
self
.
_loader
.
path_exists
(
role_path
):
if
self
.
_loader
.
path_exists
(
role_path
):
return
(
role_name
,
role_path
)
return
(
role_name
,
role_path
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment