New Windows support for Ansible

Hi Ansiblites,

Great to see you’ve added Windows support: 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

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 :slight_smile:

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. :slight_smile: I certainly appreciate Ansible and its KISS design so far.

-Ben