diff --git a/lib/ansible/modules/system/systemd.py b/lib/ansible/modules/system/systemd.py index 7c7fd6a4d9..4610338e7a 100644 --- a/lib/ansible/modules/system/systemd.py +++ b/lib/ansible/modules/system/systemd.py @@ -348,6 +348,8 @@ def main(): # this should not happen? module.fail_json(msg="Service is in unknown state", status=result['status']) + result['state'] = f module.params['state'] + module.exit_json(**result) if __name__ == '__main__':