I would like to open a web browser with ansible

Hello I’d like to open a web browser into my Windows session with ansible, i’ve tried with this playbook, but this has no effect on my session

  • name: Starting nginx
    win_shell: Start-Process -FilePath ‘D:\Stream\nginx-rtmp-win32-master\nginx.exe’

  • name: Starting all vivaldi windows
    win_shell: start-process -FilePath ‘C:\Users\Julien\AppData\Local\Vivaldi\Application\vivaldi.exe’ -ArgumentList ‘www.site.com

Thank you

Petit Julien.

By default winrm only has a batch logon, so starting interactive programs can’t be done like this.

You might be able to use ‘become’ to achieve what you want - see See https://docs.ansible.com/ansible/2.6/user_guide/become.html#become-and-windows.

If you need to download something to the windows machine you can use win_get_url module.

Jon