ansible windows -i /etc/anisible/hosts -m win_ping --ask-vault-pass -vvvvI have also tried using a playbook. However I get some cows :) and connection could be established.
ansible_ssh_user: Administrator ansible_ssh_pass: test ansible_ssh_port: 5986 ansible_connection: winrm
tasks: - action: win_pingIs there something that I am missing?
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/3f8137c9-082d-4591-be0f-9889847b78b5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
VERBOSE: Verifying WS-MAN
VERBOSE: PS remoting is already active and running
VERBOSE: SSL-based remoting already active
VERBOSE: basic auth already enabled
Ok.
VERBOSE: PS Remoting successfully setup for AnsibleEnter code here...
<10.1.11.40> ESTABLISH CONNECTION FOR USER: root<10.1.11.40> REMOTE_MODULE win_ping<10.1.11.40> EXEC ['ssh', '-C', '-tt', '-vvv', '-o', 'ControlMaster=auto', '-o', 'ControlPersist=60s', '-o', 'ControlPath=/home/avinashs/.ansible/cp/ansible-ssh-%h-%p-%r', '-o', 'Port=22', '-o', 'KbdInteractiveAuthentication=no', '-o', 'PreferredAuthentications=gssapi-with-mic,gssapi-keyex,hostbased,publickey', '-o', 'PasswordAuthentication=no', '-o', 'ConnectTimeout=10', '10.1.11.40', "/bin/sh -c 'mkdir -p $HOME/.ansible/tmp/ansible-tmp-1408690690.7-187551343997386 && echo $HOME/.ansible/tmp/ansible-tmp-1408690690.7-187551343997386'"]EXEC previous known host file not found for 10.1.11.4010.1.11.40 | FAILED => SSH encountered an unknown error. The output was:OpenSSH_6.6.1, OpenSSL 1.0.1f 6 Jan 2014debug1: Reading configuration data /etc/ssh/ssh_configdebug1: /etc/ssh/ssh_config line 19: Applying options for *debug1: auto-mux: Trying existing masterdebug1: Control socket "/home/avinashs/.ansible/cp/ansible-ssh-10.1.11.40-22-root" does not existdebug2: ssh_connect: needpriv 0debug1: Connecting to 10.1.11.40 [10.1.11.40] port 22.debug2: fd 3 setting O_NONBLOCKdebug1: connect to address 10.1.11.40 port 22: Connection refusedssh: connect to host 10.1.11.40 port 22: Connection refused
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/4f01287f-50cc-4233-b100-7d11e101b8e9%40googlegroups.com.
Invoke-Command -ComputerName AnsibleHost1 -ScriptBlock { Get-childitem c:\} -credential $cred
> winrm identify -r:http://10.1.11.40:5985/wsman -auth:basic -u:administrator -p:password -encoding:utf-8IdentifyResponseProtocolVersion = http://schemas.dmtf.org/wbem/wsman/1/wsman.xsdProductVendor = Microsoft CorporationProductVersion = OS: 6.2.9200 SP: 0.0 Stack: 3.0SecurityProfilesSecurityProfileName = http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/basic, http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/https/basic, http://schemas.dmtf.org/wbem/wsman/1/wsman/secprofile/http/spnego-kerberos, h
>>> import winrm>>> s = winrm.Session('http://10.1.11.40:5985/wsman', auth=('administrator', 'password'))>>> r = s.run_cmd('ipconfig', ['/all'])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>File "/usr/local/lib/python2.7/dist-packages/winrm/__init__.py", line 26, in run_cmdshell_id = self.protocol.open_shell()File "/usr/local/lib/python2.7/dist-packages/winrm/protocol.py", line 103, in open_shellrs = self.send_message(xmltodict.unparse(rq))File "/usr/local/lib/python2.7/dist-packages/winrm/protocol.py", line 173, in send_messagereturn self.transport.send_message(message)File "/usr/local/lib/python2.7/dist-packages/winrm/transport.py", line 102, in send_messageraise WinRMTransportError('http', ex.reason)winrm.exceptions.WinRMTransportError: 500 WinRMTransport. [Errno 22] Invalid argument
I have exactly the same problem and I agree too that all points to an pywinrm issue.
Does anyone know what is causing this and how to solve it ?
Server controle : Ansible 1.7 running on Ubuntu 12.04
Node : Windows 2008 r2
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a958126e-20f5-4e0d-a1ca-14a1a397e248%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Ansible Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ansible-proje...@googlegroups.com.
To post to this group, send email to ansible...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a958126e-20f5-4e0d-a1ca-14a1a397e248%40googlegroups.com.