Limit to specific host
Run only against specific hosts from inventory
ansible-playbook -i inventory playbook.yml --limit host1,host2
More ansible commands
-
ansible-playbook -i inventory playbook.yml --tags install,configureExecute only tasks matching these tags
-
ansible-playbook -i inventory playbook.yml --skip-tags cleanupSkip tasks with the specified tags
-
ansible-playbook -i inventory playbook.yml --check --diffSimulate execution without making changes
-
ansible all -i inventory -m pingCheck connectivity to all hosts in inventory
-
ansible all -i inventory -m shell -a 'uptime'Run a one-liner shell command on all hosts