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
c83c534a
Commit
c83c534a
authored
Apr 25, 2013
by
Matt Coddington
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Search for roles in the roles subdir first. Throw an error when no role .yml files are found.
parent
4a4958f6
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
lib/ansible/playbook/play.py
+4
-2
No files found.
lib/ansible/playbook/play.py
View file @
c83c534a
...
...
@@ -160,9 +160,9 @@ class Play(object):
with_items
=
has_dict
.
get
(
'with_items'
,
None
)
when
=
has_dict
.
get
(
'when'
,
None
)
path
=
utils
.
path_dwim
(
self
.
basedir
,
o
rig_path
)
path
=
utils
.
path_dwim
(
self
.
basedir
,
o
s
.
path
.
join
(
'roles'
,
orig_path
)
)
if
not
os
.
path
.
isdir
(
path
)
and
not
orig_path
.
startswith
(
"."
)
and
not
orig_path
.
startswith
(
"/"
):
path2
=
utils
.
path_dwim
(
self
.
basedir
,
o
s
.
path
.
join
(
'roles'
,
orig_path
)
)
path2
=
utils
.
path_dwim
(
self
.
basedir
,
o
rig_path
)
if
not
os
.
path
.
isdir
(
path2
):
raise
errors
.
AnsibleError
(
"cannot find role in
%
s or
%
s"
%
(
path
,
path2
))
path
=
path2
...
...
@@ -171,6 +171,8 @@ class Play(object):
task
=
utils
.
path_dwim
(
self
.
basedir
,
os
.
path
.
join
(
path
,
'tasks'
,
'main.yml'
))
handler
=
utils
.
path_dwim
(
self
.
basedir
,
os
.
path
.
join
(
path
,
'handlers'
,
'main.yml'
))
vars_file
=
utils
.
path_dwim
(
self
.
basedir
,
os
.
path
.
join
(
path
,
'vars'
,
'main.yml'
))
if
not
os
.
path
.
isfile
(
task
)
and
not
os
.
path
.
isfile
(
handler
)
and
not
os
.
path
.
isfile
(
vars_file
):
raise
errors
.
AnsibleError
(
"found role at
%
s, but cannot find
%
s or
%
s or
%
s"
%
(
path
,
task
,
handler
,
vars_file
))
if
os
.
path
.
isfile
(
task
):
nt
=
dict
(
include
=
task
,
vars
=
has_dict
)
if
when
:
...
...
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