env ANSIBLE_LOAD_CALLBACK_PLUGINS=1 ansible winserv -i ../windows_servers -m win_ping
54.68.166.123 | FAILED => 500 WinRMTransport. [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
import ssl
if hasattr(ssl, '_create_default_https_context') and hasattr(ssl, '_create_unverified_context'):
ssl._create_default_https_context = ssl._create_unverified_context
class CallbackModule(object):
pass
bin_ansible_callbacks=True
callback_plugins = /callback_plugins/fix-ssl.py
callback_plugins = /callback_plugins/fix-ssl.py
configured but that would be an unusual location if you intended an absolute path. I think you need to configure a full path to the folder, not the name of a file for callback_plugins if I recall.callback_plugins = /usr/share/local/callback_plugins/
(and obviously you'd need to put
fix-ssl.py into /usr/share/local/callback_plugins). I'm not familiar with OSX paths so /usr/share/local/callback_plugins is just intended to be an example folder.
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