Ansible on Windows Environment

Hi,

We followed below steps to use Ansible on Windows.

  1. Installing Ansible on Cygwin
  2. Using Host machine as Windows machine
  3. Using Powershell to perform actions.

The issues which we are facing are :

  1. On launching any application it launches as background task (service).
  2. PSExec when used also will be triggered as service.

The Tasks which were successful using powershell is running in background when we use win_shell. The same happens for win_cmd as well.

Kindly Suggest

Hi

It is not clear what you are trying to do.

By default ansible connects to Windows as batch login type, not interactive user, so usually there is no graphical user interface available to ansible. You can get an interactive user login by using the Become feature of ansible, but ansible is not really intended to drive graphical user interfaces. It can be used for various things but I think it is best for installing software and enforcing configuration across many machines.

Ansible might still be useful to you but it's not clear to me what you are trying to achieve.

Hope this helps,

Jon

Thanks Jon for the Response!

Let me explain it in a detailed way.

we would be performing the below Tasks using Ansible and since this is WIndows Environment, we are using the Powershell Scripts.

  1. Create VM ( Working as Expected)
  2. Launch the Application (Here, the application is launched as Background service)
  3. Take a screen shot to confirm that the Application is Launched.