From NovaOrdis Knowledge Base
Ping all Hosts from a Group
This will also list the hosts from that group.
ansible all -m ping
Execute a Shell Command on all Hosts in Some Groups
ansible masters,nodes -m shell -a "systemctl status docker | grep Active"
ansible <my-servers> -m copy -a "src=/root/ipa-ca.crt dest=/etc/origin/master"