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
e2497f0c
Commit
e2497f0c
authored
Oct 10, 2012
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote branch 'abondis/named_actions_2' into devel
parents
79069827
e07bfd9e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
lib/ansible/playbook/task.py
+11
-2
No files found.
lib/ansible/playbook/task.py
View file @
e2497f0c
...
...
@@ -17,6 +17,9 @@
from
ansible
import
errors
from
ansible
import
utils
import
ansible.constants
as
C
import
os
from
os
import
pathsep
class
Task
(
object
):
...
...
@@ -38,9 +41,15 @@ class Task(object):
def
__init__
(
self
,
play
,
ds
,
module_vars
=
None
):
''' constructor loads from a task or handler datastructure '''
modules_list
=
set
()
for
path
in
C
.
DEFAULT_MODULE_PATH
.
split
(
pathsep
):
modules_list
.
update
(
os
.
listdir
(
path
))
modules_list
=
list
(
modules_list
)
for
x
in
ds
.
keys
():
if
not
x
in
Task
.
VALID_KEYS
:
if
x
in
modules_list
:
ds
[
'action'
]
=
x
+
" "
+
ds
.
get
(
x
,
None
)
ds
.
pop
(
x
)
elif
not
x
in
Task
.
VALID_KEYS
:
raise
errors
.
AnsibleError
(
"
%
s is not a legal parameter in an Ansible task or handler"
%
x
)
self
.
module_vars
=
module_vars
...
...
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