ansible-playbook

The command that runs a playbook, printing a banner for each play and task, a result per host, and a recap at the end.

In more detail

Useful flags include --check and --diff to preview changes, --list-hosts to see targets, -i to choose an inventory, -e to pass extra variables and --ask-become-pass to supply a sudo password. It reads ansible.cfg from the current directory first.

Example

ansible-playbook --check --diff preview.yml

Related terms

Taught in

References

Certification courses