Also enable credSSP authorization in winrm on the host:
winrm get winrm/config (to see the settings)
winrm set winrm/config/client/auth @{CredSSP="True"} 
or Set-Item -Path WSMan:\localhost\Service\Auth\CredSSP -Value $true

I would also check to make sure nothing else is using the default SSH 
listener (port 5986)  I don't think you want to use unsecure 5985, so you 
should set the ansible vars to 5986 and https.  If that still doesn't work 
maybe try adding ansible_winrm_transport: CredSSP after 
ansible_connection=winrm.



On Monday, July 31, 2017 at 11:14:30 PM UTC-7, Soniya panwar wrote:

> Hi
> I am running ansible 2.3.1.0 on centos7. The host(windows) machine is 
> windows 8 with powershell.
> I have installed pywinrm[credssp] (Authentication method credSSP is being 
> used) on centos and included windows hostnames in the inventory file. 
>
> Below are the settings in group variables file:
>
> ansible_user=Administrator
> ansible_password=password
> ansible_port:=5985
> ansible_connection=winrm
> ansible_winrm_scheme: http
> ansible_winrm_server_cert_validation=ignore
>
>
> Now, windows machine is pinging form Centos (ping command is returning 
> response). But, ping to windows machine is not successful through ansible:
>
>  ansible windows -m win_ping -v
>
> window | FAILED! => {
>     "failed": true,
>     "msg": "winrm send_input failed"
> } 
>
> I have also run the powershell script on the windows machine and it worked 
> fine, winrm service is also running.
>
> powershell.exe -File ConfigureRemotingForAnsible.ps1 -verbose
>
> VERBOSE: Verifying WinRM service.
> VERBOSE: PS Remoting is already enabled.
> VERBOSE: SSL listener is already active.
> VERBOSE: Basic auth is already enabled.
> VERBOSE: Firewall rule already exists to allow WinRM HTTPS.
> VERBOSE: HTTP: Enabled | HTTPS: Enabled
> VERBOSE: PS Remoting has been successfully configured for Ansible.
>
> Any ideas what I am doing wrong?
>

-- 
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-project+unsubscr...@googlegroups.com.
To post to this group, send email to ansible-project@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ansible-project/9674c3b0-20c3-452e-96cd-dff19972f6bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to