Unable to start IBM WAS(WebSphere application Server) through ansible playbook

Controller Node:-
OS : Rhel8.8
Ansible Version: core 2.15.0
Python Version: 3.9.16
Pywinrm Version: 0.4.3

Managed HOST:-
OS : windows server 2016

INVENTRY:-
using winrm for connection and transport method is ntlm on port 5986 and user is administrator

PLAYBOOK:- pvic02 in playbook is the name of the server

SO I am trying to start a service in remote windows host using ansible win_command module. and after running the above playbook i get o/p as “server serverName open for e-business and process id is ”.

and the o/p looks exactly similar to the o/p you get after running the command manually on the server, according to which service is started.

And to confirm if service is actually started or not we can run a serverStatus.bat command on windows manually which shows status of the service.
running this gives o/p as “The application server cannot be reached it appears to be stopped” so in actual service is not started.

So To troubleshoot the issue i did below things which is explained below:-
Tried running the startServer command manually on windows machine directly which does following things:

  1. It creates new log directory in the WAS SERVICE path.
  2. It generates a PID(process id)
  3. and it starts a service named java.exe which can be viewed in task manager.

But while running the same command form ansible the scenario is as given below.

  1. It creates new logs file in windows machine
  2. It generates a PID
  3. But it does not generate a service named java.exe in windows machine.

I have even checked the logs of IBM WAS service and it their is no error.

NOTE:- I am just not able to start the service. stopping the service form ansible is working properly and getting reflected in windows host as well.