The appropriate solution to verifying SSL or not in v2 is to put the
following in your inventory:

ansible_winrm_server_cert_validation=ignore ansible_winrm_transport=ssl

As for xmltodict, you didn't say why those things didn't work, but a `pip
install -U xmltodict --user python` should have worked.  I notice the thing
that did work, indicated that you needed to use `--user`, and the things
that didn't work did not include that flag.

On Thu, Mar 3, 2016 at 10:38 AM, Slim Slam <[email protected]> wrote:

> Ansible 2.0.1
>
> Control machine: Latest version of Amazon Linux - CentOS 6 variant  (has
> stock Python 2.7.10)
> Target machine:  AWS Windows Server 2012R2 (prepared for Ansible)
>
> Two errors occur:
>
> 1. "ImportError: No module named xmltodict"
>
> Solution:
>
> Things that DID NOT WORK:
> pip install xmltodict
> pip install python-xmltodict
> yum install xmltodict
> yum install python-xmltodict
>
> Thing that DID WORK:
> pip install --upgrade pywinrm --user python
>
> 2.  "WinRMTransportError: 500 WinRMTransport. [SSL:
> CERTIFICATE_VERIFY_FAILED] certificate verify failed"
>
> Solution:
> There are a few solutions, but I like my solution here:
> https://groups.google.com/d/msg/ansible-project/PNzzvbeT5hY/BwfgLOBIDAAJ
>
> Slightly modified for Amazon Linux:
>
> Edit (or create) the file /usr/lib/python2.7/site-packages/sitecustomize.py
> Add this code to the file:
>
> 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
>
> Isn't this supposed to be fixed (or have an option) in Ansible 2 ??
>
> ===
>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/ansible-project/65be21d8-1281-4fca-8dda-d60ff62f6518%40googlegroups.com
> <https://groups.google.com/d/msgid/ansible-project/65be21d8-1281-4fca-8dda-d60ff62f6518%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Matt Martz
@sivel
sivel.net

-- 
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/CAD8N0v8Os_QKzeUxkoW802d0hj-qY2JfctAVhrG42jH9qvmDWg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to