ansible-playbook Command Examples

Execute tasks defined in playbook on remote machines over SSH. More information: https://docs.ansible.com/ansible/latest/cli/ansible-playbook.html.

ansible-playbook {{playbook}}

ansible-playbook {{playbook}} -i {{inventory_file}}

ansible-playbook {{playbook}} -e "{{variable1}}={{value1}} {{variable2}}={{value2}}"

ansible-playbook {{playbook}} -e "@{{variables.json}}"

ansible-playbook {{playbook}} --tags {{tag1,tag2}}

ansible-playbook {{playbook}} --start-at {{task_name}}

ansible-playbook {{playbook}} --check --diff