# New Windows support for Ansible

**URL:** <https://forum.ansible.com/t/new-windows-support-for-ansible/15516>\
**Category:** Ansible Developer\
**Tags:** windows\
**Created:** [June 20, 2014, 7:49pm UTC](https://forum.ansible.com/t/new-windows-support-for-ansible/15516 "2014-06-20T19:49:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Hoyt](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@Ben\_Hoyt](https://forum.ansible.com/u/Ben_Hoyt)\
**Post date:** [June 20, 2014, 7:49pm UTC](https://forum.ansible.com/t/new-windows-support-for-ansible/15516/1 "2014-06-20T19:49:59Z")

</div>

Hi Ansiblites,

Great to see you’ve added Windows support: [http://www.ansible.com/blog/windows-is-coming](http://www.ansible.com/blog/windows-is-coming)

And I really like the approach you’ve taken to keep Windows like Windows. Using a lowest cross-platform denominator approach or a “install all these Linuxy tools on your Windows boxes” approach don’t seem like great ideas. So kudos.

That said, one thing I’m curious/cautious about is the need for win\_\* modules where the functionality could be the same? Is this the plan moving forward, or is the plan to merge certain modules once Windows support is better?

For example, why win\_ping when you can use ping, and it would just connect using Powershell remoting instead of SSH?

Similarly, why win\_get\_url when there’s nothing about “get\_url” that’s particularly Linux-only? I realize win\_get\_url’s functionality is much reduced at the moment, but it’ll grow, and instead of this you could have a “OSes” column in the “get\_url” docs with “Linux” or “Linux, Windows” in it as appropriate. It’d kind of be like if Python had two different modules to fetch URLs, urllib2 and win\_urllib2.

In other words, make things cross-platform where appropriate, but separate them when that’s appropriate. For example, I think win\_msi and win\_user make sense, as packaging and user management are quite different on Windows. Pinging and fetching URLs are not so much. In a similar vein, Python’s “os” module has several functions and parameters which are clearly labelled Linux only, but where applicable, they’re cross-platform.

Thoughts?

-Ben

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan1](https://avatars.discourse-cdn.com/v4/letter/m/5e9695/32.png) [@Michael\_DeHaan1](https://forum.ansible.com/u/Michael_DeHaan1)\
**Post date:** [June 20, 2014, 8:18pm UTC](https://forum.ansible.com/t/new-windows-support-for-ansible/15516/2 "2014-06-20T20:18:46Z")

</div>

The modules are going to diverge and it’s better to seperate them than have a lot of caveats about what works one way on windows and which parameters don’t work.

Further, it’s better to have all the modules in a common directory and list, which this also enables.

win\_ping is perhaps the easy example to nitpick, seeing it takes a very small number of options, but they may diverge significantly in the future.

get\_url has quite different options, etc.

Rest assured, this was discussed and we are not total morons just implementing something without thinking about it 🙂

---

<div class="post-metadata">

**Author:** ![Ben\_Hoyt](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@Ben\_Hoyt](https://forum.ansible.com/u/Ben_Hoyt)\
**Post date:** [June 20, 2014, 8:51pm UTC](https://forum.ansible.com/t/new-windows-support-for-ansible/15516/3 "2014-06-20T20:51:13Z")

</div>

Yeah, I think this makes sense. Still unsure about non-Windows specific things like get\_url, but I understand the up-front design decision.

For the record, the phrase “total morons” is Michael’s, not mine! “One thing I’m curious/cautious about” were the words I used. 🙂 I certainly appreciate Ansible and its KISS design so far.

-Ben
