From 2fc7c8b4602ee7eb1db3250155ab7861387d7105 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yannig=20Perr=C3=A9?= Date: Sat, 28 Nov 2015 10:30:42 +0100 Subject: [PATCH] More restrictive test against variable name to allow setting variable starting with _. --- lib/ansible/parsing/mod_args.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index 7e4f6132fa..ba2a37cea0 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -159,7 +159,7 @@ class ModuleArgsParser: # we don't allow users to set them directy in arguments if action not in ('command', 'shell', 'script', 'raw'): for arg in args: - if arg.startswith('_') and arg not in ('_raw_params'): + if arg.startswith('_ansible_'): raise AnsibleError("invalid parameter specified for action '%s': '%s'" % (action, arg)) # finally, update the args we're going to return with the ones