# playbook to install software on windows clients from linux control machine

**URL:** <https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531>\
**Category:** Ansible Project\
**Tags:** windows\
**Created:** [June 17, 2015, 4:53pm UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531 "2015-06-17T16:53:42Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![priya.netrovert](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@priya.netrovert](https://forum.ansible.com/u/priya.netrovert)\
**Post date:** [June 17, 2015, 4:53pm UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/1 "2015-06-17T16:53:42Z")

</div>

Hi,

I am trying to write a playbook which will install windows software(exe files) on windows client machine from the control machine (software is on control machine)

I want to either copy the software onto Windows machine and then install using ansible or directly install on the windows machine from the control.

Please help, i tried to search in google for help but no luck,

Much appreciated for help.

Thanks.

---

<div class="post-metadata">

**Author:** ![benno\_joy](https://avatars.discourse-cdn.com/v4/letter/b/73ab20/32.png) [@benno\_joy](https://forum.ansible.com/u/benno_joy)\
**Post date:** [June 18, 2015, 2:55am UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/2 "2015-06-18T02:55:45Z")

</div>

Hi,

Did yo try using the win\_copy module to copy across the package and installing it via win\_msi module or your own script to install it issued via the script module.

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [June 18, 2015, 9:51am UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/3 "2015-06-18T09:51:59Z")

</div>

win\_copy is a bad idea. WinRM is simply not built for transferring binary files. The recommendation is to have the file accessible on a UNC path/url and then use win\_package to get it onto the windows machine.

---

<div class="post-metadata">

**Author:** ![priya.netrovert](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@priya.netrovert](https://forum.ansible.com/u/priya.netrovert)\
**Post date:** [June 19, 2015, 3:20pm UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/4 "2015-06-19T15:20:08Z")

</div>

win\_copy does not work as the file size is around 300MB. I need to deploy the package on to number of windows clients and install it. Is win\_package released module, i couldnt find it.

Another way i tried was to use win\_get\_url to download the package, but it looks like each client calls ftp to download causing overhead.

Any ideas, please help,

Thanks

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [June 24, 2015, 8:53pm UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/5 "2015-06-24T20:53:19Z")

</div>

I think you are most likely to be successful if you set up a web server on your ansible controller and then use win\_get\_url to fetch and then run the .exe to install (or use win\_package as suggested above as I believe this will retrieve from http and install).

Bear in mind you will have almost the same amount of traffic if you push from your ansible controller to each of your windows hosts as you would if you asked each of your clients to fetch from your controller. You would still be transferring roughly the same amount of data regardless of whether you did this via http, cifs (windows file sharing) or another protocol.

You could even use something like varnish to cache the http response into RAM to speed up subsequent requests for the same file, but probably not worth it if you are only have a small number of windows hosts to manage.

Jon

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [June 24, 2015, 10:47pm UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/6 "2015-06-24T22:47:20Z")

</div>

win\_package is currently PRed waiting for a friendly +1 to get it merged into modules-extras. You can find it here in the meantime:

[https://github.com/ansible/ansible-modules-extras/pull/618](https://github.com/ansible/ansible-modules-extras/pull/618)

---

<div class="post-metadata">

**Author:** ![priya.netrovert](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@priya.netrovert](https://forum.ansible.com/u/priya.netrovert)\
**Post date:** [June 25, 2015, 2:59pm UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/7 "2015-06-25T14:59:18Z")

</div>

To overcome this, I wrote a powershell script which will call “Get-SCPFile” cmdlet by Posh-SSH and was able to successfully copy the file from controlling node to windows clients.

Is win\_package module going to be with ansible version 1.9.2 and anyone when stable version 1.9.2 is going to be released

Thanks

---

<div class="post-metadata">

**Author:** ![priya.netrovert](https://avatars.discourse-cdn.com/v4/letter/p/f4b2a3/32.png) [@priya.netrovert](https://forum.ansible.com/u/priya.netrovert)\
**Post date:** [June 25, 2015, 3:04pm UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/8 "2015-06-25T15:04:46Z")

</div>

Does win\_package do a copy similar to win\_copy? It would be good if we have a win module which will copy binary files with bigger size from controlling machine to clients. This will be easier for people who do not want to setup any ftp.

Thanks

---

<div class="post-metadata">

**Author:** ![Trond\_Hindenes](https://avatars.discourse-cdn.com/v4/letter/t/96bed5/32.png) [@Trond\_Hindenes](https://forum.ansible.com/u/Trond_Hindenes)\
**Post date:** [June 26, 2015, 1:44pm UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/9 "2015-06-26T13:44:32Z")

</div>

Creatign a wrapper around the powershell ssh/scp module is a very good idea. We should get on that.

win\_package simply takes a UNCpath/url/local path to install the package. It won’t directly solve your problem as far as I can see.

---

<div class="post-metadata">

**Author:** ![Deepa\_Yr](https://avatars.discourse-cdn.com/v4/letter/d/b77776/32.png) [@Deepa\_Yr](https://forum.ansible.com/u/Deepa_Yr)\
**Post date:** [March 8, 2016, 7:25am UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/10 "2016-03-08T07:25:45Z")

</div>

Were you able to resolve installation of exe files on windows ?

---

<div class="post-metadata">

**Author:** ![j.r.hawkesworth](https://avatars.discourse-cdn.com/v4/letter/j/a3d4f5/32.png) [@j.r.hawkesworth](https://forum.ansible.com/u/j.r.hawkesworth)\
**Post date:** [March 8, 2016, 11:35am UTC](https://forum.ansible.com/t/playbook-to-install-software-on-windows-clients-from-linux-control-machine/18531/11 "2016-03-08T11:35:33Z")

</div>

Hi Deepa

This thread is old, things have moved on.

win\_package is now part of ansible 2.0 and win\_copy is suitable for transferring files from your ansible controller to your windows machines.

Hope this helps,

Jon
