# ansible windows -i inventory -vvvv -m win_ping
ansible 2.6.2
config file = /home/ec2-user/ansible.cfg
configured module search path = [u'/usr/share/my_modules']
ansible python module location = /home/ec2-user/venv/local/lib/python2.7/site-packages/ansible
executable location = /home/ec2-user/venv/bin/ansible
python version = 2.7.14 (default, May 2 2018, 18:31:34) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)]
Using /home/ec2-user/ansible.cfg as config file
setting up inventory plugins
Parsed /home/ec2-user/inventory inventory source with yaml plugin
Loading callback plugin minimal of type stdout, v2.0 from /home/ec2-user/venv/local/lib/python2.7/site-packages/ansible/plugins/callback/minimal.pyc
META: ran handlers
Using module file /home/ec2-user/venv/local/lib/python2.7/site-packages/ansible/modules/windows/win_ping.ps1
<10.206.46.246> ESTABLISH WINRM CONNECTION FOR USER: lanadmin on PORT 5985 TO 10.206.46.246
checking if winrm_host 10.206.46.246 is an IPv6 address
<10.206.46.246> WINRM CONNECT: transport=ntlm endpoint=http://10.206.46.246:5985/wsman
<10.206.46.246> WINRM CONNECTION ERROR: Parse() argument 1 must be string or read-only buffer, not None
Traceback (most recent call last):
File "/home/ec2-user/venv/local/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 386, in _winrm_connect
self.shell_id = protocol.open_shell(codepage=65001) # UTF-8
File "/home/ec2-user/venv/local/lib/python2.7/site-packages/winrm/protocol.py", line 161, in open_shell
root = ET.fromstring(res)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1311, in XML
parser.feed(text)
File "/usr/lib64/python2.7/xml/etree/ElementTree.py", line 1657, in feed
self._parser.Parse(data, 0)
TypeError: Parse() argument 1 must be string or read-only buffer, not None
windows | UNREACHABLE! => {
"changed": false,
"msg": "ntlm: Parse() argument 1 must be string or read-only buffer, not None",
"unreachable": true
}
----------------------
# Inventory settings
ansible_host: 10.206.46.246
ansible_user: lanadmin
ansible_password: xxxxxx
ansible_port: 5985
ansible_connection: winrm
ansible_winrm_transport: ntlm
ansible_winrm_server_cert_validation: ignore
Attempts at a fix
1. I've tried changing the authentication type, but it just shows the same error message with that authentication type prepended.
2. I've ran the ConfigureRemotingForAnsible.ps1 script on my windows machine
3. I've tested the windows machine according to https://docs.ansible.com/ansible/2.5/user_guide/windows_setup.html#common-winrm-issues
--
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+unsubscribe@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/376a58de-64a9-4f38-96f1-09de04539358%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
# pip list
Package Version
---------------------------- -----------
ansible 2.6.2
asn1crypto 0.24.0
backports.ssl-match-hostname 3.5.0.1
bcrypt 3.1.4
cached-property 1.4.3
certifi 2018.4.16
cffi 1.11.5
chardet 3.0.4
cryptography 2.3
docker 3.4.1
docker-compose 1.22.0
docker-pycreds 0.3.0
dockerpty 0.4.1
docopt 0.6.2
enum34 1.1.6
functools32 3.2.3.post2
idna 2.6
ipaddress 1.0.22
Jinja2 2.10
jsonschema 2.6.0
MarkupSafe 1.0
ntlm-auth 1.2.0
paramiko 2.4.1
pip 18.0
pyasn1 0.4.4
pycparser 2.18
PyNaCl 1.2.1
pywinrm 0.3.0
PyYAML 3.13
requests 2.18.4
requests-ntlm 1.1.0
setuptools 40.0.0
six 1.11.0
texttable 0.9.1
urllib3 1.22
websocket-client 0.48.0
wheel 0.31.1
xmltodict 0.11.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-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/1acccdcf-c07d-430b-a921-1107e57e9f17%40googlegroups.com.