Commit f6190015 by Michael DeHaan

Merge pull request #6943 from fxkr/merge-test-module-allow-yaml-in-command-line-parameter

Make test-module interpret --args='{...' as yaml.
parents eb1b4892 3b06ab84
...@@ -93,6 +93,10 @@ def boilerplate_module(modfile, args, interpreter): ...@@ -93,6 +93,10 @@ def boilerplate_module(modfile, args, interpreter):
# Argument is a YAML file (JSON is a subset of YAML) # 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:])) complex_args = utils.combine_vars(complex_args, utils.parse_yaml_from_file(args[1:]))
args='' 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 = {} inject = {}
if interpreter: if interpreter:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment