Fix logic of LB deleting from Recycle Bin and LB list getting

This commit is contained in:
2024-06-04 16:30:00 +03:00
parent 421d19bfa8
commit 90ae212d0c
2 changed files with 5 additions and 4 deletions

View File

@@ -322,7 +322,8 @@ def main():
elif decon.lb_facts['status'] == "DELETED":
if amodule.params['state'] in ['present', 'enabled']:
decon.action(restore=True)
elif amodule.params['state'] == 'absent':
elif (amodule.params['state'] == 'absent' and
amodule.params['permanently']):
decon.delete()
elif amodule.params['state'] == 'disabled':
decon.error()