From 48c0d6388ff0cfaa760e77617170ebffe60298ba Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Tue, 2 Jun 2015 15:37:06 -0400 Subject: [PATCH] moved RAW var to class and as a frozenset --- lib/ansible/parsing/mod_args.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index c24b581fa89..19a51212f72 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -25,6 +25,20 @@ from ansible.errors import AnsibleParserError from ansible.plugins import module_loader 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: """ @@ -264,19 +278,6 @@ class ModuleArgsParser: thing = value 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 action is None: raise AnsibleParserError("no action detected in task", obj=self._task_ds)