Not possible, it should work, I had the same issue. What error message are
you getting now? ARe you able to ping the server? Can you post the
screenshot of Windows firewall for ports 5985 and 5986. Also, important
that user " myusername" does exist on that remote Windows Server.

I have done this setup for Windows Server 2016 and SQL Server 2014 SP2 and
it works like a charm!

Kind Regards
Ameya Agashe



On Fri, Oct 26, 2018 at 9:13 AM Nk Chitturi <[email protected]> wrote:

> thanks for that, but still I am getting same error.
> my host machine is w windows 2016 and linux controller is centos and they
> both were on same corporate domain.
> any suggestions..
>
> On Thu, Oct 25, 2018 at 2:34 PM ameya agashe <[email protected]>
> wrote:
>
>> Simple and easy fix.
>>
>> Run on the remote computer the following command.
>> netsh advfirewall firewall add rule name="Allow WinRM (Http)" dir=in
>> localport=5985 protocol=tcp action=allow enable=yes
>> netsh advfirewall firewall add rule name="Allow WinRM (Https)" dir=in
>> localport=5986 protocol=tcp action=allow enable=yes
>>
>> This should fix your problem.
>>
>> Kind Regards
>> Ameya Agashe
>>
>> On Fri, Oct 26, 2018 at 7:35 AM Nk Chitturi <[email protected]> wrote:
>>
>>> I am trying to run ping command on my windows host from  linux controller
>>>
>>> i created inventory.txt file
>>> [win]
>>> servername
>>> [win:vars]
>>> ansible_user=myusername
>>> ansible_password=password
>>> ansible_connection=winrm
>>> ansible_winrm_transport=basic
>>> ansible_winrm_server_cert_validation=ignore
>>> ansible_port=5986
>>>
>>> the error Iam getting is
>>>
>>> servername | UNREACHABLE! => {
>>>     "changed": false,
>>>     "msg": "basic: HTTPSConnectionPool(host='servernname', port=5986):
>>> Max retries exceeded with url: /wsman (Caused by
>>> NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at
>>> 0x7f8ad0f13f90>: Failed to establish a new connection: [Errno 111]
>>> Connection refused',))",
>>>     "unreachable": true
>>> }
>>>
>>> --
>>> 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/e7b4d353-00d6-41eb-8914-c2fa40bcfbaa%40googlegroups.com
>>> <https://groups.google.com/d/msgid/ansible-project/e7b4d353-00d6-41eb-8914-c2fa40bcfbaa%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
>> 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/CAG9tf--ovoAAYnegAMDStgmT5nHY9uujoiiHVaDO62j7Vw7WEQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/ansible-project/CAG9tf--ovoAAYnegAMDStgmT5nHY9uujoiiHVaDO62j7Vw7WEQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
>
>
>
> --
> 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/CABdF8S0va5XdtRYwQw_bkA%3D6DP%2BF1%2BLUKrUD8%3DzhGFp%2BWEN2MQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/ansible-project/CABdF8S0va5XdtRYwQw_bkA%3D6DP%2BF1%2BLUKrUD8%3DzhGFp%2BWEN2MQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAG9tf-_6T2fMFcuboEZTB8Lx5poYh4g-Oo6E5H2Ob-bM0rzX%3DA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to