title: Ping a host inside ansible playbook
body: <p>I just want to ping a host(DNS host) to check reachability. Looks there is no proper way to do this? I'm not sure. Below is my playbook with <code>net_ping</code></p>
  
  <pre><code>---
  - name: Set User
    hosts: web_servers
    gather_facts: false
    become: false
    vars:
      ansible_network_os: linux
  
    tasks:
    - name: Pinging Host
      net_ping
        dest: 10.250.30.11
  </code></pre>
  
  <p>But,</p>
  
  <pre><code>TASK [Pinging Host] *******************************************************************************************************************
  task path: /home/veeru/PycharmProjects/Miscellaneous/tests/ping_test.yml:10
  ok: [10.250.30.11] =&gt; {
      "changed": false, 
      "msg": "Could not find implementation module net_ping for linux"
  }
  
  </code></pre>
  
  <p>With <code>ping</code> module</p>
  
  <pre><code>---
  - name: Set User
    hosts: dns
    gather_facts: false
    become: false
  
    tasks:
    - name: Pinging Host
      action: ping
  </code></pre>
  
  <p>Looks like it is trying to ssh into the IP.(Checked in verbose mode). I don't know why? How can I do ICMP ping? I don't want to put the DNS IP in inventory also. </p>
  
  <p><strong>UPDATE1:</strong></p>
  
  <p>hmm, Looks like there no support for <code>linux</code> in <code>ansible_network_os</code>.</p>
  
  <p><a href="https://www.reddit.com/r/ansible/comments/9dn5ff/possible_values_for_ansible_network_os/" rel="nofollow noreferrer">https://www.reddit.com/r/ansible/comments/9dn5ff/possible_values_for_ansible_network_os/</a></p>