fix(config): missing variable

This commit is contained in:
s3lph 2023-02-07 22:52:23 +01:00
parent e1cdc2b210
commit 8b64a9bbc1
Signed by: s3lph
GPG key ID: 0AA29A52FB33CFB5

View file

@ -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():