All you would need to do is just

- action: ping

The ping module will get called for the current host in the host loop
automatically.

There isn't a way to specify an ICMP ping though, that's just a SSH
connectivity test to the current host alias, as looked up by hostname.

What you may have to do is use the "add_host" module to create a temporary
host for the given floating IP, if you want to test it is accessible.






On Wed, Mar 26, 2014 at 3:45 PM, YuLing Chen <[email protected]> wrote:

> Hi All,
>
> I'm looking for the syntax to ping a remote host in ansible playbook. I
> created something as follows, but it seems the syntax is wrong.
>
>  - name: assign floating ip
>     quantum_floating_ip:
>          login_username: '{{login_username}}'
>          login_password: '{{login_password}}'
>          login_tenant_name: '{{project_name}}'
>          instance_name: '{{instance_name}}'
>          network_name: ext_net
>          internal_network_name: mgmt_network
>     register: v_floating_ip
>
>   - name: validate connectivity to the controller
>     action: ping
>         ip_address: '{{v_floating_ip.public_ip}}'
>
> I got the floating ip from the previous step successfully. Now I just
> would like to ping the floating ip to make sure it's accessible. Any idea
> how I would be able to do?
>
> Thanks,
>
> YuLing
>
>
>  --
> 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/7963b46f-98f0-4f0f-9656-b899827afb38%40googlegroups.com<https://groups.google.com/d/msgid/ansible-project/7963b46f-98f0-4f0f-9656-b899827afb38%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/CAEVJ8QOGuvOrvAtXEjkthmBu2v-H8p9vVnpHjBqnKdQw_BR%2BSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to