Update the settings in the inventory file provisioning/hosts
to match your machines.
All examples assume that they are run inside the provisioning/
directory.
Check the uptime of a single host www5.wunderbyte.at
:
ansible -i hosts www5.wunderbyte.at -m command -a uptime
Check the uptime of all hosts in the dev
group:
ansible -i hosts dev -m command -a uptime
Here, command
is a module and the -a
argument provides the thing you want to execute.
List disk usage for all dev
hosts:
ansible -i hosts dev -m command -a "df -lh"