diff --git a/plugins/modules/config.py b/plugins/modules/config.py index f096f2c..a6ab66b 100644 --- a/plugins/modules/config.py +++ b/plugins/modules/config.py @@ -85,7 +85,7 @@ import subprocess REQUIRE_FORCE = ['instanceid', 'secret', 'passwordsalt'] -def iter_system(module, tree=None, value=None): +def iter_system(module, result, tree=None, value=None): if tree is None: tree = [] if value is None: @@ -95,11 +95,11 @@ def iter_system(module, tree=None, value=None): for k, v in value.items(): subtree = tree + [k] if isinstance(v, dict): - changed = changed or iter_system(module, subtree, v) + changed = changed or iter_system(module, result, subtree, v) continue if isinstance(v, list): v = {str(i): v for i, v in enumerate(v)} - changed = changed or iter_system(module, subtree, v) + changed = changed or iter_system(module, result, subtree, v) continue elif isinstance(v, int): typ = 'integer' @@ -202,7 +202,7 @@ def run_module(): module.fail_json(msg=msg, **result) # Apply Nextcloud system configuration recursively - result['changed'] = iter_system(module) + result['changed'] = iter_system(module, result) # Apply Nextcloud app configuration for app, ac in module.params['apps'].items():