ansible all -m shell -a 'df -h | grep /data'

Category: IaC & Automation

ansible all -m shell -a 'df -h | grep /data'

Run a shell command with pipes on all hosts

Executes the command through the target's shell, so pipes, redirects, and variable expansion work. Prefer the command module when you do not need shell features, because shell syntax differs between systems. Related: ansible all -m command.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.