title: Ansible: unable ping Windows VM, throws SSLError
body: <p>Ansible Server: Ubuntu 7.3.0-16ubuntu3 </p>
  
  <pre><code>IP: 10.aa.bb.2
  </code></pre>
  
  <p>Windows VM: Windows Server 2016</p>
  
  <pre><code>IP: 10.aa.bb.1
  </code></pre>
  
  <p>Used this to ping:</p>
  
  <pre><code>ansible windows -m win_ping
  </code></pre>
  
  <p>Throws the error:</p>
  
  <pre><code>10.aa.bb.1 | UNREACHABLE! =&gt; {
      "changed": false,
      "msg": "ssl: HTTPSConnectionPool(host='10.aa.bb.1', port=5986): Max retries exceeded with url: /wsman (Caused by SSLError(SSLError(1, u'[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:726)'),))",
      "unreachable": true
  }
  </code></pre>
  
  <p>I configured the windows vars in /etc/ansible/hosts like this:</p>
  
  <pre><code>[windows]
  10.aa.bb.1
  
  [windows:vars]
  ansible_user=username
  ansible_password=password_for_windows
  ansible_port=5986
  ansible_connection=winrm
  ansible_winrm_cert_validation=ignore
  </code></pre>
  
  <p>On Windows VM, I set the inbound rules for port 5986, and also run the ConfiguringRemotingForAnsible.ps1 for configuration.The result of <code>winrm e winrm/config/listener</code> is:</p>
  
  <pre><code>Listener 
  Address = *                                                          
  Transport = HTTP                                                     
  Port = 5985                                                          
  Hostname                                                             
  Enabled = true                                                       
  URLPrefix = wsman                                                    
  CertificateThumbprint                                                
  ListeningOn = 10.aa.bb.1, 127.0.0.1, ::1                                                                                              
  Listener                                                                 
  Address = *                                                          
  Transport = HTTPS                                                    
  Port = 5986                                                          
  Hostname = hostname                                             
  Enabled = true                                                       
  URLPrefix = wsman                                                    
  CertificateThumbprint = 036F429259C04211xxxxxxxxxxxxxxxxxxxxD5     
  ListeningOn = 10.aa.bb.1, 127.0.0.1, ::1
  </code></pre>
  
  <p>I don't know if I missed something in the configuration, because If I used the VMs both were created in the Azure, there would be no mistakes about this.</p>