mirror of
https://github.com/univention/ansible-modules.git
synced 2025-10-26 11:19:34 +00:00
univention_config_registry does not propperly fail
This commit is contained in:
parent
8110fb54a9
commit
fc881e2fff
@ -123,7 +123,7 @@ def _set_keys(keys, result, module):
|
||||
result['rc'] = rc
|
||||
result['message'] = "These keys were set: {}".format(" ".join(to_set))
|
||||
result['meta']['changed_keys'] = to_set
|
||||
result['failed'] = rc != 0
|
||||
result['failed'] = rc != 0 or len(err) > 0
|
||||
|
||||
if rc != 0:
|
||||
module.fail_json(msg='non-zero return code', **result)
|
||||
@ -160,7 +160,7 @@ def _unset_keys(keys, result, module):
|
||||
result['rc'] = rc
|
||||
result['message'] = "These keys were unset: {}".format(" ".join(to_unset))
|
||||
result['meta']['changed_keys'] = to_unset
|
||||
result['failed'] = rc != 0
|
||||
result['failed'] = rc != 0
|
||||
|
||||
if rc != 0:
|
||||
module.fail_json(msg='non-zero return code', **result)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user