fix(config): missing variable
This commit is contained in:
parent
e1cdc2b210
commit
8b64a9bbc1
1 changed files with 4 additions and 4 deletions
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue