import ssl
try:
_create_unverified_https_context = ssl._create_unverified_context
except AttributeError:
# Legacy Python that doesn't verify HTTPS certificates by default
pass
else:
# Handle target environment that doesn't support HTTPS verification
ssl._create_default_https_context = _create_unverified_https_context--
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/65be21d8-1281-4fca-8dda-d60ff62f6518%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
PLAY [Configure the EC2 instance] **********************************************
TASK [setup] *******************************************************************
gather_facts: True
vars:
ansible_port: 5986
ansible_connection: winrm
ansible_winrm_transport: ssl
ansible_winrm_server_cert_validation: ignore
....
....PLAY [Configure the EC2 instance] **********************************************
TASK [setup] *******************************************************************
<52.36.20.10> ESTABLISH WINRM CONNECTION FOR USER: Administrator on PORT 5986 TO 52.36.20.10
<52.36.20.10> WINRM CONNECT: transport=ssl endpoint=https://52.36.20.10:5986/wsman
<52.36.20.10> WINRM CONNECTION ERROR: 500 WinRMTransport. [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", line 138, in _winrm_connect
protocol.send_message('')
File "/home/ec2-user/.local/lib/python2.7/site-packages/winrm/protocol.py", line 193, in send_message
return self.transport.send_message(message)
File "/home/ec2-user/.local/lib/python2.7/site-packages/winrm/transport.py", line 138, in send_message
raise WinRMTransportError('http', ex.reason)
WinRMTransportError: 500 WinRMTransport. [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
fatal: [52.36.20.10]: FAILED! => {"failed": true, "msg": "ssl: 500 WinRMTransport. [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)"}To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/a737dc6e-902a-460d-883a-9b39180d0ce2%40googlegroups.com.