Skip to content

Commit 74fbe5c

Browse files
committed
fix app evaluated state mismatch
Signed-off-by: Marc Crébassa <[email protected]>
1 parent 3ac9aa0 commit 74fbe5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/modules/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def main():
137137
target_state = module.params.get("state", "present")
138138
nc_app = app(module, app_name)
139139
# case1: switch between enable/disable status
140-
if (target_state == "disabled" and nc_app.state == "enabled") or (
140+
if (target_state == "disabled" and nc_app.state == "present") or (
141141
target_state == "present" and nc_app.state == "disabled"
142142
):
143143
if module.check_mode:
@@ -189,7 +189,7 @@ def main():
189189
except AppExceptions as e:
190190
e.fail_json(module, **result)
191191
# case3: update the application if posible
192-
elif target_state == "updated" and nc_app.state in ["enabled", "present"]:
192+
elif target_state == "updated" and nc_app.state == "present":
193193
if nc_app.update_available:
194194
if module.check_mode:
195195
result["actions_taken"].append("updated")

0 commit comments

Comments
 (0)