I have configured Ansible on my ubuntu 14.04 and my target machine is a 
windows server 2016, but it fails when using credssp or plain text:

I tried: *ansible -m win_ping all --ask-pass -vvvvvvv*

Below is the output I see:


ansible 2.5.3
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', 
u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/dist-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.6 (default, Nov 23 2017, 15:49:48) [GCC 4.8.4]
Using /etc/ansible/ansible.cfg as config file
SSH password:
setting up inventory plugins
Parsed /etc/ansible/hosts inventory source with ini plugin
Loading callback plugin minimal of type stdout, v2.0 from 
/usr/lib/python2.7/dist-packages/ansible/plugins/callback/minimal.pyc
META: ran handlers
Using module file 
/usr/lib/python2.7/dist-packages/ansible/modules/windows/win_ping.ps1
<HARSHTSR-domain.com> ESTABLISH WINRM CONNECTION FOR USER: GAR\ad_harshtsr 
on PORT 5985 TO HARSHTSR-domain.com
checking if winrm_host HARSHTSR-domain.com is an IPv6 address
<HARSHTSR-domain.com> WINRM CONNECT: transport=credssp 
endpoint=http://HARSHTSR-domain.com:5985/wsman
<HARSHTSR-domain.com> WINRM CONNECTION ERROR: 'Session' object has no 
attribute 'merge_environment_settings'
Traceback (most recent call last):
  File 
"/usr/lib/python2.7/dist-packages/ansible/plugins/connection/winrm.py", 
line 356, in _winrm_connect
    self.shell_id = protocol.open_shell(codepage=65001)  # UTF-8
  File "/usr/local/lib/python2.7/dist-packages/winrm/protocol.py", line 
157, in open_shell
    res = self.send_message(xmltodict.unparse(req))
  File "/usr/local/lib/python2.7/dist-packages/winrm/protocol.py", line 
234, in send_message
    resp = self.transport.send_message(message)
  File "/usr/local/lib/python2.7/dist-packages/winrm/transport.py", line 
243, in send_message
    self.build_session()
  File "/usr/local/lib/python2.7/dist-packages/winrm/transport.py", line 
156, in build_session
    settings = session.merge_environment_settings(url=self.endpoint, 
proxies={}, stream=None,
AttributeError: 'Session' object has no attribute 
'merge_environment_settings'


(changed actual domain name to domain.com above).

I have all the necessary modules installed:

pywinrm requests requests-credssp.

Can someone please help here?


my requests version is 2.9.1

pywinrm version is 0.3.0

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/7fb421e8-3bdc-4645-a50e-af70797f63f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to