mirror of
https://github.com/freeipa/ansible-freeipa.git
synced 2026-05-06 13:23:14 +00:00
ipatopologysegment: Fail for missing entry with reinitialized
Currently it is ignored if the entry for reinitialized can not be found if the name or left and right are not correct. Now there is a failure in this case. Fixes: #107 (Reinitialize are failed to find the node in ipatopology ..) Signed-off-by: Thomas Woerner <twoerner@redhat.com>
This commit is contained in:
@@ -311,6 +311,18 @@ def main():
|
||||
|
||||
commands.append(["topologysegment_reinitialize", args,
|
||||
suffix])
|
||||
else:
|
||||
params = []
|
||||
if name is not None:
|
||||
params.append("name=%s" % name)
|
||||
if left is not None:
|
||||
params.append("left=%s" % left)
|
||||
if right is not None:
|
||||
params.append("right=%s" % right)
|
||||
ansible_module.fail_json(
|
||||
msg="No entry '%s' for suffix '%s'" %
|
||||
(",".join(params), suffix))
|
||||
|
||||
else:
|
||||
ansible_module.fail_json(msg="Unkown state '%s'" % state)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user