I would like to open a web browser with ansible

48 views
Skip to first unread message

Julien

unread,
Oct 20, 2018, 5:48:28 AM10/20/18
to Ansible Project
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.

J Hawkesworth

unread,
Oct 22, 2018, 5:16:52 AM10/22/18
to Ansible Project
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
Reply all
Reply to author
Forward
0 new messages