ansible/ansible — pull request #2739 by dahpgjgamgan (2013-04-22 08:47:31+00:00)
Title: support for running modules on windows

Hello,

This is my first attempt to add a basic support for running modules on windows with it's native python (not cygwins version as proposed on mailing lists). The changes are basically to eliminate instant error messages like "unable to import syslog", but I will probably work on creating some windows-specific modules (a module for file permissions and network facts seem necessary).

--
The support still works on some assumptions, namely:
- symlinks created for /bin/bash /usr/bin/python (I've used cygwin's bash but I think msys would work too) and other used system utilities.
- some ssh server working on Windows (though a transport plugin for winrm wouldn't be a bad idea)
- administrative privileges for user executing commands

--
Summary of changes:
- module_common:
- syslog optional, revert to call eventcreate command on windows
- os.chown optional, revert to many winapi calls on windows
- pwd/grp optional, revert to many winapi calls on windows
- setup module:
- removed unused fcntl module import, changed way epoch time fact is gathered
- file module:
- removed pwd/grp imports (which are available through module common)

--
I'm more than happy to discuss on mailing list or here, if windows support could be taken into consideration in the official repo, and my approach is acceptable.