Run specific tag ansible
Execute only tasks matching these tags
ansible-playbook -i inventory playbook.yml --tags install,configure
more ansible
all 56 commands →
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'
Ad-hoc copy file
ansible all -i inventory -m copy -a 'src=./file dest=/tmp/file'