Re: [ansible-project] unable to ping windows machine

105 views
Skip to first unread message
Message has been deleted

Mauricio Tavares

unread,
Sep 17, 2020, 10:25:54 AM9/17/20
to ansible...@googlegroups.com
On Thu, Sep 17, 2020 at 10:23 AM PRAVEEN KATTULAPALLI
<159y1...@ksrmce.ac.in> wrote:
>
> i got the below error when i am trying to ping windows machine
> i have ran that configurepowershell.ps1 power script also and my winrm service is running successfully nut still facing same issue, please give me a solution for this.
>
> win2016 | UNREACHABLE! => {
> "changed": false,
> "msg": "basic: HTTPConnectionPool(host='win2016', port=5985): Max retries exceeded with url: /wsman (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x7f8b2e02ed90>, 'Connection to 52.168.175.51 timed out. (connect timeout=30)'))",
> "unreachable": true
>
> I used the below details for connection in inventory:
> [windows]
> win2016
>
> [windows:vars]
> ansible_user=root
> ansible_password=password
> ansible_connection=winrm
> ansible_port=5985
> ansible_winrm_transport=basic
> ansible_ssh_port=5986
> ansible_winrm_server_cert_validation=ignore
>
Can you ping it from the command line?

> --
> 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-proje...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/2664c96f-09b2-415a-9858-3d7224045501n%40googlegroups.com.

PRAVEEN KATTULAPALLI

unread,
Sep 17, 2020, 10:42:53 AM9/17/20
to ansible...@googlegroups.com
yes, I did it from command line . i used this command
ansible all -i hosts -m win_ping.

got the above error. 

Mauricio Tavares

unread,
Sep 17, 2020, 11:23:40 AM9/17/20
to ansible...@googlegroups.com
On Thu, Sep 17, 2020 at 10:42 AM PRAVEEN KATTULAPALLI
<159y1...@ksrmce.ac.in> wrote:
>
> yes, I did it from command line . i used this command
> ansible all -i hosts -m win_ping.
>
> got the above error.
>
I meant running the ping command, no ansible involved, from the
command line, as in

ping win2016.box.somewhere.out.there

If you can't ping using, well, ping don't blame ansible.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAByHfFEJtM_t5h5LXumjMpMDBZHq7AHgJag6NfZdKy7QM6XAgw%40mail.gmail.com.

Kundan Singh

unread,
Sep 17, 2020, 11:27:39 AM9/17/20
to ansible...@googlegroups.com
Hi 

Insted of root please mention administrator
And it's password

windows:vars]
ansible_user=adminstrator

And check

PRAVEEN KATTULAPALLI

unread,
Sep 17, 2020, 11:37:25 AM9/17/20
to ansible...@googlegroups.com
I have one major doubt 
Ansible_user:
Ansible_password:

What does these two commands represent?.

Do they represent windows credentials or the user credentials from which you want to ping windows machine.

Kundan Singh

unread,
Sep 17, 2020, 11:40:07 AM9/17/20
to ansible...@googlegroups.com
Yes these are endpoint credential for user


PRAVEEN KATTULAPALLI

unread,
Sep 17, 2020, 11:59:03 AM9/17/20
to ansible...@googlegroups.com
Sorry for asking again end point credentials means windows..

Mauricio Tavares

unread,
Sep 17, 2020, 12:04:22 PM9/17/20
to ansible...@googlegroups.com
On Thu, Sep 17, 2020 at 11:59 AM PRAVEEN KATTULAPALLI
<159y1...@ksrmce.ac.in> wrote:
>
> Sorry for asking again end point credentials means windows..
>
He meant whatever WIndows user you want ansible to use to login
to this win2016 box.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/CAByHfFF7Up7y61-keHaKxofDpsZrneTM0W3piEkTTW_4TAutSg%40mail.gmail.com.

PRAVEEN KATTULAPALLI

unread,
Sep 18, 2020, 10:19:13 AM9/18/20
to ansible...@googlegroups.com
Hii all,

well

thanks for your help. resolved!!

As previously someone communicated, before try to ping windows vm from ansible needs to check whether it is pinging from other windows or linux machine by using ping ip command.

Reply all
Reply to author
Forward
0 new messages