Ansible 2 · Ad-hoc commands

Run a command on a group

Run a shell command on every host in the webservers group.

ansible webservers -i inventory.ini -m command -a "uptime"

Official Ansible 2 documentation

More ad-hoc commands commands

All ad-hoc commands commands · Ansible 2 cheatsheet

Was this page helpful?