This is what am getting
ansible 2.4.2.0 config file = /etc/ansible/ansible.cfg configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/sha re/ansible/plugins/modules'] ansible python module location = /usr/lib/python2.7/site-packages/ansible executable location = /bin/ansible python version = 2.7.5 (default, Sep 12 2018, 05:31:16) [GCC 4.8.5 20150623 (R ed Hat 4.8.5-36)] Using /etc/ansible/ansible.cfg as config file setting up inventory plugins Parsed /etc/ansible/hosts inventory source with ini plugin Loading callback plugin minimal of type stdout, v2.0 from /usr/lib/python2.7/sit e-packages/ansible/plugins/callback/__init__.pyc META: ran handlers Using module file /usr/lib/python2.7/site-packages/ansible/modules/windows/win_p ing.ps1 <10.67.104.45> ESTABLISH WINRM CONNECTION FOR USER:username on P ORT 5986 TO 10.67.104.45 <10.67.104.45> WINRM CONNECT: transport=basic endpoint=https://10.67.104.45:5986 /wsman <10.67.104.45> WINRM CONNECTION ERROR: the specified credentials were rejected b y the server Traceback (most recent call last): File "/usr/lib/python2.7/site-packages/ansible/plugins/connection/winrm.py", l ine 222, in _winrm_connect self.shell_id = protocol.open_shell(codepage=65001) # UTF-8 File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 157, in open_s hell res = self.send_message(xmltodict.unparse(req)) File "/usr/lib/python2.7/site-packages/winrm/protocol.py", line 234, in send_m essage resp = self.transport.send_message(message) File "/usr/lib/python2.7/site-packages/winrm/transport.py", line 256, in send_ message response = self._send_message_request(prepared_request, message) File "/usr/lib/python2.7/site-packages/winrm/transport.py", line 266, in _send _message_request raise InvalidCredentialsError("the specified credentials were rejected by th e server") InvalidCredentialsError: the specified credentials were rejected by the server 10.67.104.45 | UNREACHABLE! => { "changed": false, "msg": "basic: the specified credentials were rejected by the server", "unreachable": true } Listener setup: $selector_set = @{ Address = "*" Transport = "HTTPS" } $value_set = @{ CertificateThumbprint = "EF39ECD8A40F83ACC2BE85D95303EED2EB7DCE5C" } New-WSManInstance -ResourceURI "winrm/config/Listener" -SelectorSet $selector_set -ValueSet $value_set Basic winrm setup : $url = "https://raw.githubusercontent.com/ansible/ansible/devel/examples/scripts/ConfigureRemotingForAnsible.ps1" $file = "$env:temp\ConfigureRemotingForAnsible.ps1" $username = "username " $password = "password" Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force $browser = New-Object System.Net.WebClient $browser.Proxy.Credentials =[System.Net.CredentialCache]::DefaultNetworkCredentials $browser.DownloadFile($url, $file) # version can be 3.0, 4.0 or 5.1 #&$file -Version 3.0 -Username $username -Password $password -Verbose #(New-Object -TypeName System.Net.WebClient).DownloadFile($url, $file) powershell.exe -ExecutionPolicy ByPass -File $file I just checked the connection with other windows power shell as follows. PS C:\Users\sindhu.p> winrs -r:https://ipaddress:5986/wsman -u:username -p:password ipconfig Error : Winrs error:The server certificate on the destination computer ( 10.67.104.45:5986 <http://www.google.com/url?q=http%3A%2F%2F10.67.104.45%3A5986&sa=D&sntz=1&usg=AFQjCNGbPspFWnu-c2p7l4Fbl4njC8yq4g>) has the following errors: The SSL certificate is signed by an unknown certificate authority. The SSL certificate contains a common name (CN) that does not match the hostname. On Friday, January 18, 2019 at 6:00:39 PM UTC+5:30, sindhu shree wrote: > > Hi. > Am facing some authentication issues when i run ansible all -m win_ping. > Response - 10.67.104.45 | UNREACHABLE! => { > "changed": false, > "msg": "basic: the specified credentials were rejected by the server", > "unreachable": true > } > > The user which am trying to connect is administrator user. I followed some > steps to add user and change the permissions using > > winrm configSDDL default, but no luck. > Am using basic authentication. > > Am new to Linux , i would appreciate if i get any help on this. > > -- You received this message because you are subscribed to the Google Groups "Ansible Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to ansible-devel+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.