Re: [ansible-project] Ansible play to check if port is up on windows target host

7 views
Skip to first unread message
Message has been deleted

Mauricio Tavares

unread,
Feb 1, 2019, 12:03:54 AM2/1/19
to ansible...@googlegroups.com
Maybe https://docs.ansible.com/ansible/latest/modules/win_wait_for_module.html
instead?

On Thu, Jan 31, 2019 at 11:26 PM Sindhuja Koneru
<sindhuj...@gmail.com> wrote:
>
> Hi,
>
> can anyone guide me why i am getting this failure message even when both the ports are UP and running.
>
>
> PLAYBOOK:
> ==========
>
> ---
>
> - hosts: windows_target_Machines
>
> gather_facts: false
>
>
>
>
>
> tasks:
>
>
>
> - name: Check if a port is running
>
> wait_for:
>
> port: "{{ item }}"
>
> state: started
>
> delay: 3
>
> timeout: 6
>
> ignore_errors: yes
>
> with_items:
>
> - 443
>
> - 80
>
> delegate_to: localhost
>
>
>
>
> OUTPUT:
>
> ========
>
> TASK [Check if a port is running] **********************************************
>
> failed: [hostname.corp.com -> localhost] (item=443) => {"changed": false, "elapsed": 6, "item": 443, "msg": "Timeout when waiting for #######:443"}
>
> failed: [hostname.corp.com -> localhost] (item=80) => {"changed": false, "elapsed": 6, "item": 80, "msg": "Timeout when waiting for #########:80"}
>
>
> --
> 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 post to this group, send email to ansible...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/ansible-project/cfd6853e-b1c1-4c3f-a572-f04ef8fcccd4%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages