diff --git a/jperm/ansible_api.py b/jperm/ansible_api.py index 407d5cf8a..ccaf17efe 100644 --- a/jperm/ansible_api.py +++ b/jperm/ansible_api.py @@ -195,10 +195,7 @@ class Tasks(Command): if value.get("msg"): msg[key] = value.get("msg") - if not msg: - return {"status": "ok"} - else: - return {"status": "failed","msg": msg} + return {"status": "ok"} if msg else {"status": "failed","msg": msg} def add_user(self, user):