Bug 32317

Summary: (py)winrm -- another way to execute cmds remotely on Windows
Product: New/proposed packages Reporter: Ivan Zakharyaschev <imz>
Component: Обычный репозиторийAssignee: Andrey Cherepanov <cas>
Status: CLOSED FIXED QA Contact: Andrey Cherepanov <cas>
Severity: enhancement    
Priority: P3 CC: evg, viy
Version: не указана   
Hardware: all   
OS: Linux   
URL: https://github.com/diyan/pywinrm

Description Ivan Zakharyaschev 2016-07-26 16:53:12 MSK
https://github.com/diyan/pywinrm

-- can be used like that:

import winrm

s = winrm.Session('windows-host.example.com', auth=('john.smith', 'secret'))
r = s.run_cmd('ipconfig', ['/all'])

(I have also read some notes at https://blogs.technet.microsoft.com/heyscriptingguy/2015/10/27/using-winrm-on-linux/ .)
Comment 1 Ivan Zakharyaschev 2016-07-26 17:37:24 MSK
It can be used by https://packages.altlinux.org/en/Sisyphus/srpms/ansible :

$ rpmpeek /ALT/Sisyphus/noarch/RPMS.classic/ansible-2.0.2.0-alt2.noarch.rpm fgrep -i winrm -r . | fgrep import
./usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py:    from winrm import Response
./usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py:    from winrm.exceptions import WinRMTransportError
./usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py:    from winrm.protocol import Protocol
$ 

It optionally uses https://packages.altlinux.org/en/Sisyphus/srpms/python-module-requests-kerberos .
Comment 2 Repository Robot 2016-07-27 06:04:40 MSK
python3-module-winrm-0.2.0-alt1.git -> sisyphus:

* Tue Jul 26 2016 Ivan Zakharyaschev <imz@altlinux> 0.2.0-alt1.git
- initial build for ALT Sisyphus (ALT#32317).
Comment 3 Ivan Zakharyaschev 2016-07-28 21:45:03 MSK
A similar functionality is provided by winexe (linked with samba) --
https://bugzilla.altlinux.org/show_bug.cgi?id=32316 .

I'm including a simple wrapper around pywinrm with a command-line interface similar to winexe in python3-module-winrm-0.2.0-alt3.git. (It's useful for testing purposes.)