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
5337397a
Commit
5337397a
authored
Sep 04, 2013
by
smoothify
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Second Attempt: Ensure duplicate roles are not loaded in the case of a missing meta/main.yml file.
parent
2c6baf68
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
lib/ansible/playbook/play.py
+9
-6
No files found.
lib/ansible/playbook/play.py
View file @
5337397a
...
...
@@ -189,13 +189,15 @@ class Play(object):
meta_data
=
utils
.
parse_yaml_from_file
(
meta
)
if
meta_data
:
allow_dupes
=
utils
.
boolean
(
meta_data
.
get
(
'allow_duplicates'
,
''
))
if
not
allow_dupes
:
if
dep
in
self
.
included_roles
:
continue
else
:
self
.
included_roles
.
append
(
dep
)
else
:
continue
allow_dupes
=
False
if
not
allow_dupes
:
if
dep
in
self
.
included_roles
:
continue
else
:
self
.
included_roles
.
append
(
dep
)
dep_vars
=
utils
.
combine_vars
(
passed_vars
,
dep_vars
)
dep_vars
=
utils
.
combine_vars
(
role_vars
,
dep_vars
)
vars
=
self
.
_resolve_main
(
utils
.
path_dwim
(
self
.
basedir
,
os
.
path
.
join
(
dep_path
,
'vars'
)))
...
...
@@ -215,6 +217,7 @@ class Play(object):
# only add the current role when we're at the top level,
# otherwise we'll end up in a recursive loop
if
level
==
0
:
self
.
included_roles
.
append
(
role
)
dep_stack
.
append
([
role
,
role_path
,
role_vars
,
defaults_data
])
return
dep_stack
...
...
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