mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-06 21:32:49 +00:00
better error for bad module options (#52726)
also document clearly inline vaults don't work on 'options' fixes #52707
This commit is contained in:
@@ -687,7 +687,10 @@ def _find_module_utils(module_name, b_module_data, module_path, module_args, tas
|
||||
|
||||
if module_substyle == 'python':
|
||||
params = dict(ANSIBLE_MODULE_ARGS=module_args,)
|
||||
python_repred_params = repr(json.dumps(params))
|
||||
try:
|
||||
python_repred_params = repr(json.dumps(params))
|
||||
except TypeError as e:
|
||||
raise AnsibleError("Unable to pass options to module, they must be JSON serializable: %s" % to_native(e))
|
||||
|
||||
try:
|
||||
compression_method = getattr(zipfile, module_compression)
|
||||
|
||||
Reference in New Issue
Block a user