Sample playbook for getting shell output from stdout at distributed clients.
---
-
hosts: all
gather_facts: no
tasks:
- shell: nmap 192.168.101.0/24 -n -sP | grep report | awk '{print $5}'
register: regnmap
- debug: var=regnmap.stdout_lines