{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/38756","repository_url":"https://api.github.com/repos/ansible/ansible","labels_url":"https://api.github.com/repos/ansible/ansible/issues/38756/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/38756/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/38756/events","html_url":"https://github.com/ansible/ansible/issues/38756","id":314205553,"number":38756,"title":"net_ping returns unclear error","user":{"login":"grantcurell","id":35169230,"avatar_url":"https://avatars2.githubusercontent.com/u/35169230?v=4","gravatar_id":"","url":"https://api.github.com/users/grantcurell","html_url":"https://github.com/grantcurell","followers_url":"https://api.github.com/users/grantcurell/followers","following_url":"https://api.github.com/users/grantcurell/following{/other_user}","gists_url":"https://api.github.com/users/grantcurell/gists{/gist_id}","starred_url":"https://api.github.com/users/grantcurell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/grantcurell/subscriptions","organizations_url":"https://api.github.com/users/grantcurell/orgs","repos_url":"https://api.github.com/users/grantcurell/repos","events_url":"https://api.github.com/users/grantcurell/events{/privacy}","received_events_url":"https://api.github.com/users/grantcurell/received_events","type":"User","site_admin":false},"labels":[{"id":686214011,"url":"https://api.github.com/repos/ansible/ansible/labels/affects_2.5","name":"affects_2.5","color":"ededed","default":false},{"id":849212023,"url":"https://api.github.com/repos/ansible/ansible/labels/docs","name":"docs","color":"0052cc","default":false},{"id":496359346,"url":"https://api.github.com/repos/ansible/ansible/labels/module","name":"module","color":"1d76db","default":false},{"id":339653091,"url":"https://api.github.com/repos/ansible/ansible/labels/networking","name":"networking","color":"c7def8","default":false},{"id":636327968,"url":"https://api.github.com/repos/ansible/ansible/labels/support:community","name":"support:community","color":"ededed","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-04-13T18:22:22Z","updated_at":"2018-05-08T19:09:26Z","closed_at":"2018-05-08T19:09:26Z","author_association":"NONE","body":"##### ISSUE TYPE\r\n - Documentation Report\r\n\r\n##### COMPONENT NAME\r\nnet_ping\r\n\r\n##### ANSIBLE VERSION\r\n```\r\n[root@controlserver playbooks]# ansible-playbook --version\r\nansible-playbook 2.5.0\r\n  config file = /root/rock/playbooks/ansible.cfg\r\n  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']\r\n  ansible python module location = /usr/lib/python2.7/site-packages/ansible\r\n  executable location = /usr/bin/ansible-playbook\r\n  python version = 2.7.5 (default, Aug  4 2017, 00:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-16)]\r\nYou have new mail in /var/spool/mail/root\r\n\r\n```\r\n\r\n##### CONFIGURATION\r\n<!---\r\nIf using Ansible 2.4 or above, paste the results of \"ansible-config dump --only-changed\"\r\nOtherwise, mention any settings you have changed/added/removed in ansible.cfg\r\n(or using the ANSIBLE_* environment variables).\r\n-->\r\n\r\n##### OS / ENVIRONMENT\r\nCentOS / RHEL Server\r\n\r\n##### SUMMARY\r\nError message for net_ping unclear.\r\n\r\n##### STEPS TO REPRODUCE\r\nCreate task and run:\r\n\r\n```\r\n- hosts: all\r\n\r\n  tasks:\r\n\r\n\r\n    - name: test\r\n      net_ping:\r\n        dest: '192.168.1.1'\r\n        state: absent\r\n```\r\n\r\n##### EXPECTED RESULTS\r\nIt pings 192.168.1.1 on all hosts in inventory file and fails if 192.168.1.1 is pingable.\r\n\r\n##### ACTUAL RESULTS\r\n```\r\nFAILED! => {\"msg\": \"ansible_network_os must be specified on this host to use platform agnostic modules\"}\r\n```\r\nI tried a number of variations trying to add whatever that is. In reality, I couldn't figure out what that error message meant or what it wanted me to give it. I just want it to ping the IP address from the host and tell me if it is live or not.\r\n\r\nSpecifically, I couldn't figure out what \"network_os\" meant. Is that different from regular OS? Must be because Ansible already knows the OS from the setup module.\r\n"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/387510096","html_url":"https://github.com/ansible/ansible/issues/38756#issuecomment-387510096","issue_url":"https://api.github.com/repos/ansible/ansible/issues/38756","id":387510096,"user":{"login":"acozine","id":879121,"avatar_url":"https://avatars2.githubusercontent.com/u/879121?v=4","gravatar_id":"","url":"https://api.github.com/users/acozine","html_url":"https://github.com/acozine","followers_url":"https://api.github.com/users/acozine/followers","following_url":"https://api.github.com/users/acozine/following{/other_user}","gists_url":"https://api.github.com/users/acozine/gists{/gist_id}","starred_url":"https://api.github.com/users/acozine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/acozine/subscriptions","organizations_url":"https://api.github.com/users/acozine/orgs","repos_url":"https://api.github.com/users/acozine/repos","events_url":"https://api.github.com/users/acozine/events{/privacy}","received_events_url":"https://api.github.com/users/acozine/received_events","type":"User","site_admin":false},"created_at":"2018-05-08T19:09:26Z","updated_at":"2018-05-08T19:09:26Z","author_association":"CONTRIBUTOR","body":"@grantcurell it looks the hosts you're targeting are CentOS/RHEL servers. The `net_ping` module tests reachability **from network devices** to a remote destination - see http://docs.ansible.com/ansible/latest/modules/net_ping_module.html. For CentOS/RHEL, use the `ping` module instead - see http://docs.ansible.com/ansible/latest/modules/ping_module.html. "}}
{"actor":{"display_login":"acozine"}}