mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Make test-module interpret --args='{...' as yaml
This commit is contained in:
parent
af99abc81c
commit
3b06ab84e3
1 changed files with 4 additions and 0 deletions
|
@ -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:
|
||||||
|
|
Loading…
Reference in a new issue