Windows Modules

I need to do some custom things, (e.g. git pull/pip install -r requirements) on windows. I was able to connect to the machine over kerberos. But those modules don’t seem to work on Windows. It’s weird b/c the scripts module does work and not listed under windows modules available to use. My question is, how can i achieve this goal and/or is there a “commands” equivalent for windows?

I thought it was a python path issue, so I added:

vars:

ansible_python_interpreter: “C:\Python34\python.exe”

After adding that, I get the following:

An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ImportError: No module named ‘grp’

fatal: [qa-codegen01.theorchard.local]: FAILED! => {“changed”: false, “failed”: true, “parsed”: false}

Are we limited to the amount of modules avail for windows?

Even if you got it to execute with python, the modules are python2 not python3.

Script, fetch and raw are the only modules which run against windows that don't start with the win_ prefix.

The scripting language for Windows hosts is powershell, not Python.

You could probably use raw to run commands, but raw will always report changed = true so you would have to handle idempotency yourself.

Depending on what you want to achieve you might need to write a windows module or two.

Hope this helps,

Jon