From aa762bb432bd1fe56f0c25ad8e7664f42bedcb3a Mon Sep 17 00:00:00 2001 From: James Cammarata Date: Sat, 12 Sep 2015 17:50:05 -0400 Subject: [PATCH] Don't split args out unless we're parsing module args using the new style Fixes #12331 --- lib/ansible/parsing/mod_args.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/lib/ansible/parsing/mod_args.py b/lib/ansible/parsing/mod_args.py index 6b10dd5308..5ba0faac70 100644 --- a/lib/ansible/parsing/mod_args.py +++ b/lib/ansible/parsing/mod_args.py @@ -148,13 +148,12 @@ class ModuleArgsParser: else: (action, args) = self._normalize_new_style_args(thing) - # this can occasionally happen, simplify - if args and 'args' in args: - tmp_args = args['args'] - del args['args'] - if isinstance(tmp_args, string_types): - tmp_args = parse_kv(tmp_args) - args.update(tmp_args) + # this can occasionally happen, simplify + if args and 'args' in args: + tmp_args = args.pop('args') + if isinstance(tmp_args, string_types): + tmp_args = parse_kv(tmp_args) + args.update(tmp_args) # finally, update the args we're going to return with the ones # which were normalized above