moved RAW var to class and as a frozenset
This commit is contained in:
parent
9cd5c8092e
commit
48c0d6388f
1 changed files with 14 additions and 13 deletions
|
@ -25,6 +25,20 @@ from ansible.errors import AnsibleParserError
|
||||||
from ansible.plugins import module_loader
|
from ansible.plugins import module_loader
|
||||||
from ansible.parsing.splitter import parse_kv
|
from ansible.parsing.splitter import parse_kv
|
||||||
|
|
||||||
|
# For filtering out modules correctly below
|
||||||
|
RAW_PARAM_MODULES = frozenset(
|
||||||
|
'command',
|
||||||
|
'shell',
|
||||||
|
'script',
|
||||||
|
'include',
|
||||||
|
'include_vars',
|
||||||
|
'add_host',
|
||||||
|
'group_by',
|
||||||
|
'set_fact',
|
||||||
|
'raw',
|
||||||
|
'meta',
|
||||||
|
)
|
||||||
|
|
||||||
class ModuleArgsParser:
|
class ModuleArgsParser:
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -264,19 +278,6 @@ class ModuleArgsParser:
|
||||||
thing = value
|
thing = value
|
||||||
action, args = self._normalize_parameters(value, action=action, additional_args=additional_args)
|
action, args = self._normalize_parameters(value, action=action, additional_args=additional_args)
|
||||||
|
|
||||||
# FIXME: this should probably be somewhere else
|
|
||||||
RAW_PARAM_MODULES = (
|
|
||||||
'command',
|
|
||||||
'shell',
|
|
||||||
'script',
|
|
||||||
'include',
|
|
||||||
'include_vars',
|
|
||||||
'add_host',
|
|
||||||
'group_by',
|
|
||||||
'set_fact',
|
|
||||||
'raw',
|
|
||||||
'meta',
|
|
||||||
)
|
|
||||||
# if we didn't see any module in the task at all, it's not a task really
|
# if we didn't see any module in the task at all, it's not a task really
|
||||||
if action is None:
|
if action is None:
|
||||||
raise AnsibleParserError("no action detected in task", obj=self._task_ds)
|
raise AnsibleParserError("no action detected in task", obj=self._task_ds)
|
||||||
|
|
Loading…
Reference in a new issue