Limit to specific host ansible
Run only against specific hosts from inventory
ansible-playbook -i inventory playbook.yml --limit host1,host2
more ansible
all 56 commands →
Run specific tag
ansible-playbook -i inventory playbook.yml --tags install,configure
Skip specific tags
ansible-playbook -i inventory playbook.yml --skip-tags cleanup
Dry run (check mode)
ansible-playbook -i inventory playbook.yml --check --diff
Ad-hoc ping all hosts
ansible all -i inventory -m ping
Ad-hoc run shell command
ansible all -i inventory -m shell -a 'uptime'