From 84a6b543a918b9ff40765287167bece21d6dfacb Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Wed, 16 Dec 2015 15:28:38 -0500 Subject: [PATCH] ensure additional args are a dict They should already be templated before hitting this point? otherwise the class needs the task variables passed into it. relates to #13518 and https://groups.google.com/forum/#!msg/ansible-project/esoBcphHwHs/Ghgi_M-MCQAJ --- lib/ansible/parsing/mod_args.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index abc35a415e3..3d818f1f3e4 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -137,6 +137,8 @@ class ModuleArgsParser: # than those which may be parsed/normalized next final_args = dict() if additional_args: + if not isinstance(additional_args,dict): + raise AnsibleParserError('Complex args should be a dictionary') final_args.update(additional_args) # how we normalize depends if we figured out what the module name is