Run a command on a group of hosts
CautionExecutes the command on every host of the group through the command module, without a shell, and prints each host's output.
ansible group -m command -a 'uptime'Edit the highlighted values, then copy. They are inserted as typed, without shell escaping.
Report an issue (opens in a new tab) wrong command, wrong danger level, typo… (on GitHub)
Adapted from tldr-pages (common/ansible.md), licensed under CC BY 4.0.