Run specific tag

Execute only tasks matching these tags

ansible-playbook -i inventory playbook.yml --tags install,configure

tool
ansible56 commands
tags
ansible

More ansible commands

  • ansible-playbook -i inventory playbook.yml --skip-tags cleanup

    Skip tasks with the specified tags

  • ansible-playbook -i inventory playbook.yml --check --diff

    Simulate execution without making changes

  • ansible all -i inventory -m ping

    Check connectivity to all hosts in inventory

  • ansible all -i inventory -m shell -a 'uptime'

    Run a one-liner shell command on all hosts

  • ansible all -i inventory -m copy -a 'src=./file dest=/tmp/file'

    Copy a file to all hosts

all 56 ansible commands