summaryrefslogtreecommitdiff
path: root/hacking/test-module
diff options
context:
space:
mode:
authorFelix Kaiser <felix.kaiser@fxkr.net>2014-04-10 21:14:42 +0200
committerFelix Kaiser <felix.kaiser@fxkr.net>2014-04-10 21:14:42 +0200
commit3b06ab84e37bdcbcbd74780f0e1b070d6754c939 (patch)
tree8fece7b4e0eb76ce882f2ed3b8b296827d3eb934 /hacking/test-module
parentaf99abc81cd3b3195d12a1eeffd113301046c0f1 (diff)
downloadansible-3b06ab84e37bdcbcbd74780f0e1b070d6754c939.tar.gz
Make test-module interpret --args='{...' as yaml
Diffstat (limited to 'hacking/test-module')
-rwxr-xr-xhacking/test-module4
1 files changed, 4 insertions, 0 deletions
diff --git a/hacking/test-module b/hacking/test-module
index 3f7a8a2d64..f293458ad4 100755
--- a/hacking/test-module
+++ b/hacking/test-module
@@ -93,6 +93,10 @@ def boilerplate_module(modfile, args, interpreter):
# Argument is a YAML file (JSON is a subset of YAML)
complex_args = utils.combine_vars(complex_args, utils.parse_yaml_from_file(args[1:]))
args=''
+ elif args.startswith("{"):
+ # Argument is a YAML document (not a file)
+ complex_args = utils.combine_vars(complex_args, utils.parse_yaml(args))
+ args=''
inject = {}
if interpreter: