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
98ed6921
Commit
98ed6921
authored
Oct 08, 2014
by
Michael DeHaan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Error -> ParserError
parent
79f41d9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
v2/ansible/parsing/mod_args.py
+5
-5
No files found.
v2/ansible/parsing/mod_args.py
View file @
98ed6921
...
...
@@ -17,7 +17,7 @@
import
exceptions
from
ansible.errors
import
AnsibleError
from
ansible.errors
import
Ansible
Parser
Error
from
ansible.plugins
import
module_finder
from
ansible.parsing.splitter
import
parse_kv
...
...
@@ -70,7 +70,7 @@ class ModuleArgsParser(object):
the first part of the string is the name of the module
and the rest are strings pertaining to the arguments.
'''
tokens
=
str
.
split
()
if
len
(
tokens
)
>
1
:
return
(
tokens
[
0
],
" "
.
join
(
tokens
[
1
:]))
...
...
@@ -210,7 +210,7 @@ class ModuleArgsParser(object):
# local_action is similar but also implies a delegate_to
if
action
is
not
None
:
raise
Ansible
Error
(
"action and local_action are mutually exclusive"
)
raise
Ansible
ParserError
(
"action and local_action are mutually exclusive"
,
obj
=
self
.
_task
)
thing
=
ds
.
get
(
'local_action'
,
''
)
delegate_to
=
'localhost'
action
,
args
=
self
.
_normalize_parameters
(
thing
)
...
...
@@ -219,14 +219,14 @@ class ModuleArgsParser(object):
# module: <stuff> is the more new-style invocation
if
action
is
not
None
:
raise
Ansible
Error
(
"conflicting action statements"
)
raise
Ansible
ParserError
(
"conflicting action statements"
,
obj
=
self
.
_task
)
# walk the input dictionary to see we recognize a module name
for
(
item
,
value
)
in
ds
.
iteritems
():
if
item
in
module_finder
:
# finding more than one module name is a problem
if
action
is
not
None
:
raise
Ansible
Error
(
"conflicting action statements"
)
raise
Ansible
ParserError
(
"conflicting action statements"
,
obj
=
self
.
_task
)
action
=
item
thing
=
value
action
,
args
=
self
.
_normalize_parameters
(
value
,
action
=
action
)
...
...
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